A stye (hordeolum) develops when an eyelid gland at the base of an eyelash becomes infected. It can look like a pimple on the eyelid and can be on the inside (internal hordeolum) or outside (external hordeolum) of the lid. Styes do not harm your vision. They can occur at any age.
The area on the lid is usually painful and red where the swelling and the small pimple appears. Sometimes only small areas are affected and sometimes it is the entire eyelid.
Most styes heal within a few days on their own, but you can move the process along and help it go away faster if you put a hot compress on the area for 5 minutes every two hours. That will bring the stye to a head and will then help it heal.
A Chalazion is a different type of lid swelling is often mistaken for a stye. A chalazion is an enlarged blocked oil gland in the eyelid. A chalazion looks like a stye at the beginning and then turns into a painless hard, round bump later on. The treatment for a stye (hodeolum) and a chalazion is the same at the start. The difference is that usually there is less or no pain with a chalazion. A chalazion may linger for several months. If the chalazion remains after several months, it may need to be surgically removed.