A chalazion is a lump in the eyelid that is caused by inflammation of a gland within the skin. Typically this lump grows over days to weeks and is occasionally red, warm, or painful. The gland involved in the formation of a chalazion is a modified sweat gland that lies within the eyelid. When this gland becomes blocked, it can rupture and the inflammation process begins.
Inflammation is a process in which the body reacts to a condition and produces a biologic reaction.
This reaction can cause swelling, redness, pain, or warmth. A chalazion is not a sty. A sty can resemble a chalazion in the sense that it is also a lump in the eyelid. However, a sty involves glands and eyelash hair follicles that are closer to the skin surface of the eyelid. In addition, a sty is usually more painful and looks infected.