Misunderstanding normal force? 
In class, we recently learned about banking angles and centripetal force. The teacher said that $N\cos\theta = mg$ after finding the vertical component of normal force and setting it equal to the force of gravity. 
However, before when we were doing force diagrams, we learned that $N = mg\cos\theta$ after breaking up the components of the force of gravity and realizing that normal force equaled the y component of gravity.
How do these equations simultaneously exist at the same time?
 A: This is one of the many confusions that new students to physics face, as many of the first examples of objects on inclines do involve $N=mg\cos\theta$, so students get used to using that and forget why we can even say this in the first place.
Newton's second law is a vector equation that says the net force acting on an object is proportional to the acceleration it undergoes at any point in time
$$\sum\mathbf F=m\mathbf a$$
We can break our vectors into components, and Newton's second law holds for each component. For example, we can choose horizontal and vertical
$$\sum F_x=ma_x$$
$$\sum F_y=ma_y$$
Or for objects on an incline we can choose parallel and perpendicular to the incline
$$\sum F_\parallel=ma_\parallel$$
$$\sum F_\bot=ma_\bot$$
No choice of components is incorrect for a given system, yet certain components are better for certain systems. Typically, we choose the components so that one lies along the acceleration and the other is perpendicular to the acceleration. A good example is your typical problems of a block sliding down an incline. The acceleration is completely along the incline, so $a_\bot=0$ and Newton's second law tells us
$$\sum F_\bot=N_\bot+w_\bot=N-mg\cos\theta=0\to N=mg\cos\theta$$
However, for the banked curve this is not the case. The acceleration has a component perpendicular to the incline, so now $a_\bot\neq0$ and we have 
$$N-mg\cos\theta=ma_\bot\neq0\to N\neq mg\cos\theta$$
For the frictionless banked curve it is not incorrect to still use components parallel and perpendicular to the incline, but the acceleration has components in both of these directions, so it gets messy. Instead if the object maintains its same height on the banked curve to undergo uniform circular motion, the acceleration is completely horizontal. Therefore, we choose horizontal and vertical components where $a_y=0$. Newton's second law then tells us
$$\sum F_y=N_y+w_y=N\cos\theta-mg=0\to N\cos\theta=mg$$
This is an important thing to learn. The fact that the mass is on an inclined surface does not determine what the normal force is. The acceleration must also be considered. In general the normal force is a very tricky force. It is essentially equal to what it needs to be in order to constrain the motion of the system accordingly. To see how tricky it can be, look at a more general case of the object on the banked curve.
A: The two equations are mutually contradictory, so they cannot both be correct. Your teacher was wrong to say that cos=. 
EDIT in response to Aaron's excellent correction. Sorry, I should have said that the two equations are mutually contradictory so they cannot both be correct at the same time. You are confusing two situations (or I was!), one in which a block is simply resting on, or sliding down, a ramp, and another in which an object is moving around a cone. In the first case, the normal force is simply the reaction of the ramp to the weight of the object. In the second case it must be greater to contribute to the centripetal acceleration of the body.
