Glands in the upper and lower eyelids produce part of the tear film - if a gland becomes blocked a cyst can form. This forms a lump on the eyelid called a chalazion. It may be painless, slightly uncomfortable, or become painful, particularly if it gets infected.
Initial treatment is aimed at allowing any blocked glands to open up again. A hot compress is recommended, once or twice daily, applied to the closed eyelids for at least 5 minutes.
Traditionally this has been with a clean hot wet flannel but various heat pads are now available. These may be more effective as they have been shown to keep the eyelids at the required temperature for longer. These are widely stocked by pharmacists and optometrists and are available online.