Pyorrhoea is a disease of the mouth. It affects the teeth and the gums together, not just one part.
Bacterial plaque collects near the gum line. The gums become swollen and start to bleed. As the condition worsens, pus may form around the teeth, which is why it is called pyorrhoea, a term that literally means flow of pus.
Good oral hygiene, such as brushing twice a day and using dental floss, is the main way to prevent this condition.