feeling faint while exercising and passing out are not symptoms to be ignored, as previously stated by most of the people on here, get yourself to your doctor and then explain the situation to your instructor DO NOT CONTINUE TRAINING UNTIL YOU HAVE SEEN A MEDICAL PROFESSIONAL!
(sorry for the caps, but I was actually shouting as I typed it)
I have fainted about 2 or 3 times in my life, and come close a handful of times. I can say from experience, don't smoke or experiment with recreational drugs, that did it to me once. The other times were due to low blood sugar. I learned that I had to alter what I ate before a workout, and manage how much I work out. If I haven't done much in a while I know I can't come in and do 50 squats and 20 deadlifts and expect not to get hypoglycemic. I also learned that while potatoes are high in carbohydrates they are a poor choice of food before a workout, fruits and their juices are much better.
You should see a doctor to be sure that you don't have a medical condition I guess. I never did, but I figure the reasons were obvious in my case.
Edit: Sorry I just realized that this thread has been inactive for about 2 weeks. Hindsight's a beeoch.