During a pimple’s healing process, the body sometimes produces cells with excess melanin to replace the skin damaged by the pimple. It leads to post-inflammatory hyperpigmentation termed dark spots.