There are 2 types of red and painful eyelid lumps:
STYES are at the base of the eyelashes in the tiny opening of the oil-producing glands. The oily secretions from these glands are an essential component of the tears and help keep the eyes lubricated. If the openings become clogged, bacteria grows and a localized infection called a STYE results.
CHALAZIA look similar to a stye but affect the meibomian glands which are located deeper in the eyelids. A chalazion usually does not contain an active bacterial infection. It may initially be red and swollen but within a few days it changes to a painless, slow growing lump within the eyelid.
Treatment
Styes are usually treated with hot, moist compresses. Since the stye is caused by bacteria, usually from our hands or make-up, I recommend replacing your makeup and of course not rubbing your eyes.
Chalazia are also treated with hot moist compresses but more aggressively, 10 minutes four times a day. This may soften the debris trapped in the duct and promote drainage. Chalazia are often associated with blepharitis or eyelid inflammation and preventative steps are recommended.