Ingrown hairs develop when the hair grows back into the skin rather than out of the skin, which can lead to inflammation and an infection.