Ever fainted? It's terrifying, but 90 percent of people who have passed out are absolutely fine, said Venkatesh Thiruganasambandamoorthy, MBBS, clinical epidemiologist at the Ottawa Hospital Research Institute and an assistant professor at the University of Ottawa.

As for the other 10 percent, an underlying health condition, like an abnormal heart rhythm, is to blame, and that could mean potentially serious health concerns down the road. (Feel better starting today with Rodale's The Thyroid Cure, a new book that's helped thousands of people finally solve the mystery of what's making them feel so tired and sick.)

Fainting, no matter why it happens, is the result of a short period of time when the brain's blood supply is decreased, explained Dr. Lawrence Phillips, an assistant professor of medicine in the cardiology division at New York University's Langone Medical Center.

"The cause can stem from many different parts of the body, including a person's blood pressure going down, heart rate going down, and from neurologic reasons independent of the heart," he said. "We try to find out why the blood pressure or heart rate would go down. Some of these reasons are common and not worrisome, but others need more evaluation."

Even if you don't faint from it, that drop in blood pressure or heart rate can cause lightheadedness, that very specific yet hard to describe feeling that you might pass out. (Dizziness, on the other hand, can include lightheadedness, but it also comes with the feeling that the room is spinning around you.)

It's tricky to know when fainting or lightheadedness is a cause for concern—even doctors often feel stumped, which is why Thiruganasambandamoorthy has developed a screening tool that could help predict whether or not a person who has fainted is likely to have an underlying health problem. Below, 9 potential causes. And no matter what, play it safe by seeking medical attention for any new symptoms, or ones that don't resolve themselves. (Take control of your blood pressure with these 13 foods that lower blood pressure naturally.)

You're dehydrated.

Some people are simply predisposed to feeling lightheaded or even fainting when they get hot and sweaty and lose too much fluid. "It's common in a hot room, like standing in church in the summer," Thiruganasambandamoorthy said. "Heat triggers a pathway in the nervous system that causes blood pressure to drop." When you feel lightheaded because of dehydration and heat, lying down resupplies the heart and the brain with blood and you can feel better pretty quickly, he said. (Here's how to tell if you're dangerously dehydrated.)

You're bowled over by a surprise.

A similar reaction can be triggered when your college roommate jumps out from behind the couch at your surprise 50th birthday party. Your nervous system essentially goes into overdrive in these scenarios, Thiruganasambandamoorthy said, and your blood pressure drops suddenly, leading to lightheadedness. Usually, you do get a little bit of a warning if you're really going to faint: You might turn a little green and feel nauseated, he said. (Lose stubborn belly fat with these 9 science-backed tips.)

You stood up too quickly.

Feeling lightheaded or even seeing black spots in your vision when you hop up quickly from a seated position actually has a name: orthostatic hypotension, which describes a sudden drop in blood pressure upon standing. It's usually no biggie, but if it happens a lot or if it gets worse instead of better after a few minutes have passed, it's worth bringing up with your doctor.

You might have an abnormal heart rhythm.

Compared to the relatively slow onset of symptoms caused by "Surprise!"-related fainting, heart-related fainting comes on fast, so you might not even notice any lightheadedness. An irregular heartbeat, called an arrhythmia, means your heart beats either too slow or too fast, which can in turn affect the blood supply that reaches your brain, Phillips said. This kind of sudden fainting, often without any warning, is most concerning, said Melissa S. Burroughs Peña, MD, assistant professor of clinical medicine in the division of cardiology at the University of California, San Francisco. "Someone might be in the middle of talking and all of a sudden pass out and wake up on the floor without remembering feeling anything beforehand." That kind of experience immediately makes emergency docs think of abnormal heart rhythms, she said, which are the most common cause of sudden cardiac death.

Or a problem with a heart valve.

These are typically congenital issues, Burroughs Peña said, and are more likely to occur in younger people, whereas people 60 and up are at a higher risk of an arrhythmia. Valve problems can restrict blood flow and may cause lightheadedness or dizziness, especially during exercise, she said. (Here are 5 signs your heart isn't working as well as it should.)

Your medication's to blame.

Certain meds, like painkillers and some anti-anxiety pills, can produce dizziness or lightheadedness, Burroughs Peña said, either because they affect your brain directly or they slow your heart rate or lower your blood pressure in a way that can provoke those symptoms, Phillips said. "Sometimes when a patient has recurrent lightheadedness and I can't explain why, I'll be surprised to find it listed among less common side effects in pharmacy reports," Burroughs Peña said, so your doctor may need to double-check your medication list.

There's also a small chance you could be allergic to a med you’re taking, she adds. In rare instances when people have an anaphylactic reaction to a med, they might become lightheaded or even pass out. "It's a very dramatic immune system reaction," she said, which results in the blood vessels dilating and blood pressure dropping. "It's still a blood pressure change that causes the lightheadedness, but it's an immune reaction that causes it," she explained.

You could be having a stroke.

If you feel lightheaded (or dizzy) in conjunction with muscle weakness, difficulty speaking, or numbness and tingling, a stroke may be behind the symptoms, Phillips said, and you should seek emergency medical attention immediately. The decrease in blood flow to the brain that leads to feeling lightheaded could be caused by a blood clot in the brain, Burroughs Peña said, which can cause what's called an ischemic stroke.

You skipped lunch.

And now you're hangry. Low blood sugar can lead to lightheadedness if your brain isn't getting the fuel—aka glucose—that it needs. Rather than an issue of heart rate or blood pressure, this is more of a metabolic concern, Burroughs Peña said. Most of the time, grabbing a bite to eat will resolve your symptoms. But if you have diabetes and take medication to lower blood sugar, lightheadedness might be a sign your blood sugar is dipping dangerously, she adds, which can lead to seizures and unconsciousness.

You have the flu.

Blame dehydration and low blood sugar: You probably don't feel much like eating or drinking, but both can keep lightheadedness and other awful flu symptoms at bay, Burroughs Peña said.

This article originally appeared on Prevention.com.