A dermatologist is a medical professional who specializes in diagnosing and treating conditions related to the skin, hair, and nails.