A stye often appears as a red, sore lump near the edge of the eyelid, caused by an infected eyelash follicle. When a stye occurs inside or under the eyelid, it is called an internal hordeolum.
A cyst is an enlargement of an oil producing gland in the eyelid.
The term chalazion comes from a Greek word meaning "small lump". A chalazion forms when an oil producing gland in the eyelid called the meibomian gland becomes enlarges and the gland opening becomes clogged with oil.
Chalazions tend to develop further from the edge of the eyelid than styes. Often larger than a stye, chalazion are usually not painful. It is not caused by an infection from bacteria and it is not a cancer. Sometimes, when a stye does not heal, it can turn into a chalazion.