Keloids and hypertrophic scars develop when excessive collagen is produced during wound healing, resulting in thick, raised scars.