A chalazion can form when the duct leading from the meibomian gland to the eyelid becomes blocked. This gland produces an oily substance that lubricates the margins of the eyelid and the front of the eye. When the duct becomes blocked, the secretions from the meibomian gland harden. This causes a chalazion to form near the edge of the eyelid. This condition can become chronic.