context: If you get sudden movements like jerking or twitching in your arms or legs, it could be due to epilepsy. It's a condition that causes unusual electrical activity in your brain called seizures. Seizures themselves aren't dangerous, and they only last for a short period of time. But you could get hurt if you have one while driving or doing another activity. Epilepsy affects everyone differently. Your doctor will help you find the right treatment to keep your seizures under control. Doctors aren't sure what causes epilepsy in most folks. But there are conditions that affect the brain that could make it more likely that you get seizures, such as: Severe head injuries Stroke and blood vessel diseases Tumors Changes in brain structure Brain infections Epilepsy sometimes runs in families. One or more genes may cause changes to the brain that trigger seizures. Doctors classify seizures based on where in your brain they start, and what symptoms they cause. You may hear your doctor use one of these terms when he talks to you about your epilepsy: Focal seizures start on one side of your brain. Focal aware seizures mean you're awake and you can respond to others Focal impaired seizures mean you're not completely aware Focal motor seizures cause your body to jerk, twitch, or move in other ways Focal non-motor seizures affect how you feel or think Generalized seizures start on both sides of your brain. Generalized motor seizures make your body move or twitch Generalized non-motor seizures don't cause movement Seizures can make you move, have unusual feelings, or both. Which symptoms you have depend on the type of seizure you get. During a seizure, you might: Stare into space Get confused or be unsure of where you are Pass out Jerk or twitch your arms and legs Rub your hands, smack your lips, or make other unusual movements Notice strange smells, tastes, sounds, or sights Feel strange in general These problems can last from a few seconds to a few minutes. Most people have the same symptoms each time they have a seizure. If you think you have epilepsy, start with a visit to your primary care doctor. You might be referred to a specialist in brain disorders, called a neurologist. Your doctor will ask questions about your seizures, such as: When did you have your first one? What were you doing before it happened? What did the seizure feel like? Have you had more than one? How many? Were you tired or confused afterward? You may get a neurological exam, a series of tests that show how well your brain and the rest of your nervous system are working. Your doctor will check your: Walking skills Reflexes and coordination Muscles Senses Thinking ability Other tests your doctor may suggest to find out if you have epilepsy: EEG. It checks for problems with the electrical activity in your brain. Blood tests. They look for signs of infections and other medical problems that can cause seizures. CT (computed tomography). It's a powerful X-ray that makes detailed pictures of your brain. A CT scan can find other causes of seizures, like a tumor or infection. MRI (magnetic resonance imaging). It uses powerful magnets and radio waves to make pictures of your brain. An MRI can also look for problems in your brain, like tumors or infection. To get an epilepsy diagnosis, you must have had two or more seizures at least 24 hours apart. Doctors treat epilepsy with medicine, surgery, devices, and sometimes diet. Your doctor may suggest you try some of these treatments: Anti-seizure drugs. They're the main way to control epilepsy. Your doctor may recommend one of these medicines: Cannabidiol ( Epidiolex) Carbamazepine ( Tegretol) Clonazepam ( Klonopin) Diazepam ( Valium) Divalproex sodium ( Depacon, Depakote) Gabapentin ( Neurontin) Lorazepam ( Ativan) Phenytoin ( Dilantin) Pregabalin ( Lyrica) Topiramate ( Topamax) Valproic acid ( Valporal) Which medication you get depends on the type of seizure you have. If the first drug you try doesn't work, your doctor will switch you to another one. Surgery. It could be an option for you if medicine doesn't control your seizures, or if your seizures are caused by a brain problem like a tumor or stroke. During surgery, the doctor removes a small part of your brain that's causing your seizures, or he may make small cuts in the brain to prevent seizures from spreading. Devices. Two types are approved to treat epilepsy: Vagus nerve stimulation ( VNS) sends regular pulses of electrical energy to your brain to prevent seizures. A doctor puts the device under the skin of your chest. Responsive neurostimulation ( RNS) also sends pulses to the brain, but through a device that your doctor places under your scalp. Ketogenic diet. It's a high-fat, low-carb food plan that helps control seizures in children. It might work for adults, too, but more research is needed. The ketogenic diet is strict and complicated. You'll need to work closely with your doctor.