Edinburgh's first plague doctor was John Paulitious, who died in June of 1645.
The man appointed as his successor, George Rae, was promised huge amounts of money to take on the job. Presumably the town council didn't expect him to survive either, and therefore they wouldn't have to fulfil their promise - but he did survive, and was still pursuing them for the money ten years later.
He survived because of his clothing. He would dress head to foot in thick leather, with a mask over his face full of sweet smelling herbs. It was thought then that the plague was spread in the air - pneumonic plague - but this was bubonic plague, spread through flea bites.
The fleas (come in on the rats from Leith Docks) could not bite through Dr Rae's leather clothing.
There's a story that says the plague doctor selflessly volunteered to be locked in to Mary King's Close with the dying families. It's a lovely story (kind of...), but it's not true.
The plague doctor's job was, obviously, to diagnose and treat the bubonic plague. One method of diagnoses involved the doctor having to taste the patient's urine.
The Black Plague was so called because it caused it's victims to vomit so much and so violently that their internal organs ruptured. They would suffer massive internal bleeding and this would turn their skin black, hence the name.
Buboes would form in the victim's armpits, neck and groin. Buboes are large pus filled and spot covered ('Ring a ring of roses...') boils which grew as large as a fist and then burst, the pus leaking into the bloodstream, killing the patient.
George Rae, to save a plague victim, would treat them by slicing off the top of the buboe and ramming a red hot poker into the wound to cauterise it.
Anethetic had not yet been invented.