Wat causes stye under the upper eyelid n what is the treatment?

Warm compress. A sty is a moderately inflamed "sweat duct" in the eyelid. The ducts get blocked. I tell my patients to get a damp wash cloth and pop it in the microwave for 30 seconds. Test it on your wrist to make sure it's not too hot. Place warm compress the closed eyelid for about5-10 minutes and re-heating as necessary. If it does not get better in a week or gets worse go to your eye doctor.
Clogged oil gland. A sty is when an oil gland of the eyelid margin gets clogged and the oil backs up and forming a pocket of stagnant oil and the eyelid becomes inflamed. A hordeolum is the acute phase or beginning stage of a stye, and a chalazion is the chronic phase (where the oil becomes more granular, thick and the skin inflammation resolves, but there is still a bump/nodule in the eyelid). Warm compresses!