There are many reasons why pimples form.
Certain medications can cause your skin to flare up and pimples to form
Using skin and makeup products which aren't suitable for your skin type
Not following hygiene practices by washing sweat off frequently or removing makeup at the end of the day
Medical conditions like PCOD include pimples as a side-effect
A diet with high content of refined sugar, salt and carbohydrates may also cause pimples