They are similar to a pimple, some are more painful than others, usually not serious and do not last too long. However, in worse cases, they can sometimes cause your eyelid to swell, then an eye doctor is sometimes needed; I do not like to fool around the eye area, I would rather a specialist look into the matter.
It's basically a pimple on or under your eyelid. I get them sometimes when I don't wash off my make up completely. I think they sell over the counter medicated eye drops that I heard work really well. Unfortunately, I am too chicken to ever put eye drops in my eyes, so I just let it heal on it's own. It usually takes about 3 days for the swelling to go down and 4 days for the pain to totally subside.