There are two painful skin infections that you never want to have growing on your skin. Those are the cyst and the boil. A boil is caused strictly by an infection. A hair has gotten trapped under the skin and has cause the infection. Then pus forms under the skin in the boil.
Eventually, the pus will drain out of the skin which is good because the cysts must be cut out surgically. Since boils contain only pus, that makes it better than cysts because cysts have other stuff in them. Also, cysts can be caused in a variety of ways besides an infection. They could be caused by tumors, inflammations or something has stopped the flow of normal fluid under the skin.