Boils are swelling from infected hair follicles which fill with pus causing painful bumps.
A dermatologist is a doctor who specializes in diseases of the skin, hair, nails and mucous membranes.
A doctor or family doctor is responsible for diagnosing and prescribing medical treatments to patients. The family doctor refers to patients where a specialist when a specific treatment is required.
Remember that for the proper selection of health professional that treats boils you must consider the nature, severity and symptoms you are presenting.