A chalazion is a slowly developing lump that forms on the eyelid. It happens because of blockage and swelling of the oil glands in the eyelid and it may cause discomfort or pain as it can swell up to the size of a pea. A chalazion is usually not infected and should not be confused with a stye, which is an infection of an oil gland.