A stye (hordeolum) is a painful infection of the eyelid that appears as a bump or boil, usually involving the eyelid margin. They often result from plugging of the oil gland orifices. Treatment includes warm compresses, topical and oral antibiotics and occasionally surgical drainage. Sometimes untreated styes can progress to deeper, more serious infections, i.e., cellulitis, requiring hospitalization and intravenous antibiotics.
A chalazion is a non-infected, inflammatory lesion of the eyelid (granuloma) appearing as a non-tender bump. A chalazion may start out as a stye. Early treatment with warm compresses and topical medications may allow the chalazion to subside. If present for longer than a month or so, surgical removal is often necessary, although some chalazia respond to steroid injections.

Chalazion of right upper eyelid