I had a white like pimple like right underneath the eyelashes. When I blink its painful. I lifted up my eyelid and it burst. What caused it. What isit?

Stye. The most common cause of this condition is a blocked oil gland in the lid. The oil collects just below the surface of the skin, creating a white bump. Although scratching open the skin of the bump can relieve the irritation and allow the contents to be released, there is always the risk of an infection. This requires an eye doctor to treat. Sometimes, medication alone is all you need.
Chalazion. Sounds like a chalazion. It is caused by blockage of the duct that drains tiny oil glands called meibomian glands. The fluid they produce lubricates the eye. There is painful swelling and tenderness in the affected eyelid. Eye can be sensitive to light. Chalazions usually resolve without treatment in about a month. A larger chalazion may need surgical excision or steroid injection. See your md.