When skin is inflamed due to pimples, it activates melanocytes which produce the pigment melanin. Healthy skin will flush out excess melanin as it regenerates. But if regeneration is slow, excess melanin can stain the skin, turning into pimple marks and later dark spots.