What "exactly" happens when a ray is incident at the critical angle? The question arose when my physics teacher taught me geometrical optics and told that the phenomenon of both refraction and $reflection$ occur by change in medium. First of all, I'm not sure about the above and would like a bit clarity on this. And the main doubt emerges when I make the scenario given in the picture below:

Sorry for my bad drawing, but as you can see, my question is that what happens when I make the ray incident at (a)almost equal to critical angle (i limiting to $i_c$) and (b) at exactly $i_c$ . For the (b) part I saw this (Does light reflect if incident at exactly the critical angle?) question. But the above concept my sir taught kinda contradicts for part (a). I have given the options which should occur in the picture, (a) and (b), with (a) being wha my sir said and (b) being the other option.
If (a) is occurring, which should occur according to my teacher, then it contradicts principle of reversibility, or actually common sense, since the reverse ray won't even touch the surface, and if (b) occurs then it contradicts what my teacher taught me.
So is the teacher wrong? Where lies the fallacy?
 A: In general, reflection and refraction happen when light passes from one medium to another. You can see this if you see your own reflection in a window. Now, as a light ray approaches the critical angle, not only does the refracted ray get closer to the surface, but the amount of light transmitted gets less and less. At the critical angle, the refracted ray would be along the surface, but the amount of light is zero.
The graph below shows how much light is reflected at various angles of incidence. The graph on the right shows your situation of a ray of light moving from a dense medium to a lighter medium (glass to air, for example). At the critical angle, 100% of light is reflected, leaving none to propagate along the surface.

from http://en.wikipedia.org/wiki/Fresnel_equations
A: Let me go a little further than @mark-h's answer:
The behavior of light at an interface is described by the electro-magnetic field solution to the Helmhotlz equation. It gives the reflected and transmitted electric and magnetic components as a function of the refractive indices of the incident and exiting media. 
From those solutions we can derive the Fresnel transmission and reflection coefficients (cf. figures in @Mark-H s answer) as a function of the angle of incidence. They describe the amplitude (and phase) of the reflected and transmitted beams.
There are 2 consequences you might be interested in:


*

*Light is never be 100% transmitted. There is always some amount of reflection, even when the incident angle is below the critical angle. For air to glass interface, about 4% of the light is reflected at normal incidence (just look at your reflection in a window).

*Above the critical angle, the phenomenon is called Total Internal Reflection (TIR). 100% of the light is reflected. No light transmitted means that there is no viable propagating solution to the Helmholtz equation in the exiting medium. BUT, there is still an EM field that goes through the interface. It is  just not propagating, and is called evanescent. It exists only within a few microns from the interface and decays exponentially (If you are familiar with partial differential equations, the solution has an imaginary propagation constant).


There are other consequences at the microscopic scale, like the Goos-Hanchen effect: the reflected wave is slightly shifted parallel to the surface.
The evanescent wave phenomenon is widely used in photonics: waveguide coupling, fiber optics transmission, ellipsometry, etc. It is basically responsible for making your microprocessor work and your internet reach your home :)
A: If the light ray is normal to the surface, the maximum amount of light is transmitted.
As the light ray bends, as in your part (b), a percentage of the light will be transmitted (refracted) and the remaining will be reflected (at the incidence angle).
Very near the critical angle $\theta_c - d\theta$, likewise, some of the light will be transmitted (refracted almost tangent to the surface) and some will be reflected. At this point you can imagine the majority of the light would be reflected and only a small percentage of light is refracted.
At the critical angle $\theta_c$, although the refracted angle is tangent to the surface, the intensity is actually 0, and all the light is being reflected. 
Past the critical angle $\theta_c + d\theta$, all the light is reflected.
Likewise, in the reverse case, because the optical density of the medium is reversed, there is no $\theta_c$. At $\theta < \frac\pi2$ some of the light gets transmitted(refracted) and some gets reflected. At $\theta = \frac\pi2$ all the light gets reflected at the angle $\frac\pi2$ so the resulting conclusion is that the light simply goes in a straight line.
