A dermatologist is a doctor who specializes in treating conditions that affect the skin, hair, and nails.