When the Black Death was making victims all over Europe during the Middle Ages, plague doctors were employed by the cities to treat patients. They often didn't have a medical background, or were not successful doctors and wanted to establish themselves in this way. Because of this, they rarely cured infected people and their main purpose was recording all deaths due to the disease.
Treatments
As people did not know much about the plague, except that it was easily spread and lethal, treatment methods were controversial, to say the least. The most common medieval treatment for most diseases was bloodletting, in the belief that all bodily fluids had to be in proper balance.
Other cures include washing the patient with vinegar, sweat baths, and spicy syrup.
Plague doctors
When there were the first signs of the plague, most doctors that came in contact with patients and studied them realized that the treatments they used had no effect on their patients. Most of them thought about their own safety and ran away or did not see any patients anymore. It was then that the desperate cities and towns relied on second-rate doctors and self-proclaimed plague doctors. They were valued high and got special privileges.
Autopsies were quite rare in the Middle Ages, plague doctors were given permission to execute them though, in search of a remedy for the plague.
The Costume
In the 17th century, the doctor Charles de L'Orme invented the suit that is now typically associated with the plague. The long black overcoat, together with a face mask with a beak could be taken right out of a horror movie, but it was worn by plague doctors all over Europe. As people believed the disease could be spread through the air, the beak-mask was filled with aromatics, believing to stop them from getting sick. Typically, they used rose petals, herbs, juniper berries, myrrh and other scented materials.
They carried a wooden cane to complete the costume, providing them a way to investigate patients without touching them.
All in all, it did provide them with a basic form of protection against the disease, although they did not know why exactly and a lot of them did contract the plague themselves sooner or later in their life.