A pimple is a small pustule or papule. Pimples are small skin lesions or inflammations of the skin – they are sebaceous glands (oil glands) which are infected with bacteria, swell up, and then fill up with pus. They occur when your sebaceous glands produce too much oil.
This oil accumulation then gets infected by bacteria and a pimple is formed. It is just an inflammatory response to an invasion of bacteria inside a pore. The redness, swelling and tenderness of a pimple are all symptoms of inflammation. It becomes inflamed in response to the body attacking the bacteria, trying to prevent it from causing any damage to surrounding tissues.