Blocked oil gland. Use hot compress. And to avoid a future stye make sure you clean eye area every night with baby shampoo and warm water.
A stye is usually caused due to poor hygiene. Touching your eyes with unwashed hands can transfer bacteria (especially the bacterium staphylococcus) to your eyelids. Also, chronic inflammation along the edge of the eyelid can cause a stye. Blepharitis may be associated with underlying conditions, such as seborrheic dermatitis or rosacea, a skin condition characterized by facial redness.
Eye makeup sometimes causes styes, especially if you share makeup with others. Also, wearing too much eye makeup can sometimes cause a stye to develop. Some people notice the development of a stye during times of stress.