The dizziness that Apotheosis described during anxiety attacks is very common, whereas actual fainting is quite rare, though some people do seem to be prone to fainting (I suspect it's more common than is acknowledged in the literature on panic attacks, where it's often said that panic attacks CANNOT result in fainting

). The reason why actual fainting during panic attacks as opposed to dizziness and a feeling of being about to faint is rare is because panic temporarily increases blood pressure, whereas fainting is associated with a sudden dip in blood pressure.
As far as I can see, there are two main reasons why one might faint during a panic attack:
* in some people, fear can stimulate the vagus nerve, which slows the heart and leads to fainting. This type of fainting is called vasovagal syncope. You often feel nausea, weakness, yawning, blurring of vision, and sweating, and the skin may become cool and clammy, before you faint. It's much more common with blood, injury and injection phobias than with other types of panic. There are quite a few different physiological triggers for vasovagal syncope apart from fear. I've experienced this type of fainting on a few occasions myself, that's why I started looking into it. Apparently it's not dangerous. Clenching your hands into fists and tensing all the muscles in your body apparently can prevent a vasovagal syncope, if you know it's coming on.
* if you hyperventilate (breathe fast and shallow) over a long period, the levels of oxygen in your blood can drop and carbon dioxide accumulates, and this leads to fainting. The body's natural reaction is to drop into a lying position, so that oxygen can reach the brain. It's a self-protective mechanism. Using breathing techniques can prevent this type of fainting, but it usually takes a while to actually apply them during a panic attack. Most therapists are able to teach them, or else finding a Hatha Yoga class with a special emphasis on breathing (pranayama) would be even better IMO (breathing exercises can be exceedingly boring when there's no real context to them

).
There are quite a few other causes for fainting, most of them benign, though it would be good to see your GP to rule out any other health problems. There's lots of information on fainting here:
http://www.merck.com/mmhe/sec03/ch023/ch023b.html