Eyelid twitching is an uncontrolled muscle spasm of the eyelid. Medically this is known as a fasciculation (involuntary muscle fiber contraction) and when harmless is called benign fasciculation syndrome. These muscle twitches can manifest in any muscle group but the eyelid is very common. When the eyelid is affected this condition is called blepharospasm (Greek blepharo meaning eyelid and spasm).
Most people will have benign blepharospasm but sometimes eyelid twitching can be a symptom of motor neuron disease or peripheral nervous system diseases. Other symptoms accompanying an eyelid twitch could be cause for concern and you should seek professional medical advice. Even though the majority or eyelid twitches are harmless mention this symptom when you see your doctor to rule out any serious problems. If you have blepharospasm to the degree that it interferes with your daily life such as being unable to drive or read you should seek medical care as there are treatments for severe blepharospasm.
Below is an image showing the anatomy of eye muscles from a sideways perspective. Note that the upper eyelid where twitching most commonly occurs is controlled by the levator palpebrae superioris which is actually a much larger muscle than you might expect. This muscle contracts to draw up the upper eyelid (tarsus superior). Our eyes don’t have a dedicated muscle for moving the lower eyelid and instead use different structures known as the lower eyelid retractors. However if you have a lower eyelid twitch the culprit is likely the inferior oblique muscle that rests just behind the lower eyelid and controls eye movement.
There are many other muscles surrounding the eyes that might undergo fasciculation and cause what you would percieve as a general “eyelid twitching.” Overall it’s not very important to know which muscle is suffering from fasciculation. Instead focus on identifying the cause of your eyelid twitch.