Interesting topic. Intraoperative awareness does occur, albeit rarely. By descriptions on TV, one may wonder how this can occur and why, but if you spend some time in the OR you'll begin to formulate at least some plausible explanations. Other times, even board certified anesthesiologists (like me) cannot explain.
The use of muscle relaxants are common in anesthesia. Not the flexeril muscle relaxant type, but drugs that act at the neuromuscular junction that essentially causes temporary paralysis. This is useful to intubate someone, to help the surgeon's exposure during an intra-abdominal operation like a bowel obstruction, etc. One would think that if a patient were paralyzed by the muscle-relaxants and they became "aware", it would be obvious by looking at the hemodynamic response. Turns out this isnt always the case. That is, an autonomic response does not always accompany intra-op awareness, nor is every increase in HR and BP a sign of awareness.
Some cases are easy to figure out the cause. Say you're in an open heart case, things go awry, and in order to save the patients life you have to "lighten" the anesthesia (even though there are steps you can take to minimize awareness risk). Or maybe the clinician forgets to do something, like turning on the "gas". Other cases like I said earlier are a mystery.
There are steps clinicians take to minimize the risk.
I personally like liberal use of short acting antegrade amnestics preoperatively (i.e. midazolam). Midazolam is a great drug which in my humble opinion has several purposes.
1) Great anxiolytic which makes the patient comfortable.
2) Since it affects memory in an antegrade fashion, safeguards against intra-op awareness (not a sure thing, but helpful)
3) Patient's response to a standard dose gives the anesthesiologist an idea where the patient falls on the dose response curve. In other words, did you administer 1 milligram and the patient is snoring? Did you give 8 milligrams and the patient is wide awake? SO, it acts as a guide to anesthetic requirement.
Anesthesia administration has alot of "steps" so it is important to be kinda neurotic, especially when you first start in the field, to make sure everything is covered: amnesia, analgesia, muscle relaxation, etc.
Some of the newer monitoring technology, like the BIS monitor, is steering us in the right direction, helping us monitor anesthetic depth. Unfortunately the BIS monitor has not (so far) been shown to prevent intraoperative awareness.
In summary, intraoperative awareness is a possibility, albeit remote. An astute clinician can take several steps to minimize the risk, although the risk can probably never be totally eliminated.
Hope this helps.