A plague doctor was a special medical physician who treated those who had the plague.
They were specifically hired by towns that had many plague victims in times of plague epidemics. Since the city was paying their salary, they treated everyone: both the rich and the poor.
They were not normally professionally trained experienced physicians or surgeons, and often were second-rate doctors not able to otherwise run a successful medical business or young physicians trying to establish themselves.
In the seventeenth and eighteenth centuries, some doctors wore a beak-like mask which was filled with aromatic items.
The masks were designed to protect them from putrid air, which (according to the miasmatic theory of disease) was seen as the cause of infection.
From Pierre Vidal’s “Chapter 40: Infectious disease and arts” in Michel Tibayrenc’s Encyclopedia of Infectious Diseases: Modern Methodologies:
The nose half a foot long, shaped like a beak, filled with perfume with only two holes, one on each side near the nostrils, but that can suffice to breathe and to carry along with the air one breathes the impression of the drugs enclosed further along in the beak.
Under the coat we wear boots made in Moroccan leather (goat leather) from the front of the breaches in smooth skin that are attached to said boots and a short-sleeved blouse in smooth skin, the bottom of which is tucked into the breaches. The hat and gloves are also made of the same skin… with spectacles over the eyes.