Pimples form when *sebum*, your skin's natural oil gets trapped under the surface. It can mix with dead skin cells and form a plug called a *comedone*, or it might react with *P. acnes*, a bacterium found in hair follicles, triggering inflammation.
The (*) were to show the different systems working together to form a pimple, apologies if I was incorrect.