There are small oil producing glands, called meibomian glands, that are located in the upper and lower eyelids. If oil becomes trapped within these glands, they become inflamed and create a cyst (chalazion). A cyst may go away on its own or with warm compresses.
People who have a cyst are often prone to getting more in the future, either at the same site or other areas of the eyelids. An ophthalmologist may decide to remove the cyst (chalazion excision) if it persists.