Creatures
What is a Dementor? Azkaban, the Kiss and the Patronus
What Dementors do in the seven novels, why they guard Azkaban, and how a Patronus drives them away.

Dementors feed on happy feelings and leave people trapped with their worst memories. For much of the series they guard Azkaban, the prison of Britain's wizarding world. Their arrival brings cold and darkness; someone exposed to them may even faint. Harry Potter first encounters one on the Hogwarts Express in Prisoner of Azkaban, well before he knows how to defend himself.
What an encounter feels like
They wear cloaks, glide rather than walk, and hide a decayed face beneath the hood. Their appearance, though, is only part of the danger. Harry feels happiness disappear and hears the voices associated with the night his parents died. Other people suffer in their presence too. His response is particularly severe because of the memories the creatures draw to the surface.
The cold is not ordinary bad weather. On the train, the light fails and the compartment becomes oppressive as a Dementor searches for Sirius Black. It can incapacitate a person without striking them. Simply approaching changes what that person can feel and remember.
Why they guard Azkaban
The Ministry of Magic uses Dementors to hold prisoners at Azkaban. They strip away hope and happy memories, making confinement devastating even without an additional punishment. After Sirius Black escapes, the guards are stationed around Hogwarts. Dumbledore opposes their presence at the school. During a Quidditch match they enter the grounds and Harry falls from his broom, making the danger plain.
Their use by the government does not make them reliable police officers. They seek emotional sustenance and can harm innocent people. Near the lake in the third book, they descend on Harry and Sirius. In Order of the Phoenix, two attack Harry and Dudley in Little Whinging. A Ministry arrangement cannot turn every movement of a Dementor into a lawful or justified act.
They later join Voldemort. That shift exposes the weakness of the Ministry's arrangement: the creatures have no moral commitment to its officials. In Deathly Hallows, their presence supports the fear on which the new regime depends.
What is the Dementor's Kiss?
The Kiss is their most dreadful attack. A Dementor lowers its hood and draws a victim's soul out through the mouth. The body remains alive, but the person loses the part that made them themselves. Lupin explains this to Harry as something distinct from an ordinary death or a memory loss that can readily be repaired.
In Goblet of Fire, a Dementor administers the Kiss to Barty Crouch Jr before he can give evidence of Voldemort's return. One immediate result is the loss of a direct witness. That event does not mean every Azkaban inmate receives the Kiss. Routine exposure to the guards and this final attack are different horrors.
Harry's defence
The charm Expecto Patronum creates a Patronus that can stand between a person and Dementors. Lupin teaches Harry through repeated practice. A fully formed Patronus has an animal shape; Harry's is a stag. The difficulty is that a caster must call up a powerful happy feeling while facing creatures that suppress it. Saying the words alone will not do the job.
Harry initially produces an incomplete defence. Beside the lake, he finally casts the stag that drives away the Dementors and saves Sirius and his earlier self. In the fifth book he uses the charm to protect himself and Dudley. These scenes show that a Patronus can repel the creatures. It does not destroy them or ensure they can never return.
A boggart is different
Lupin trains Harry using a boggart in Dementor form. The resemblance works because Harry fears the creatures, but a What is a boggart? remains a boggart. His lessons are not supervised meetings with an actual Azkaban guard. This distinction explains how Harry can practise before the much more dangerous encounter at the lake.