Occlumency

"An obscure branch of magic, but a highly useful one."

- Occlumens Severus Snape

Occlumency is the act of magically closing one's mind against Legilimency. It can prevent a Legilimens from accessing one's thoughts and feelings, or influencing them. A person who practises this art is known as an Occlumens.

Methods
"I told you to empty yourself of emotion! ... Fools who wear their hearts proudly on their sleeves, who cannot control their emotions, who wallow in sad memories and allow themselves to be provoked this easily — weak people, in other words — they stand no chance against his powers! He will penetrate your mind with absurd ease, Potter!"

- Severus Snape to Harry Potter on the difficulty of learning Occlumency

The most basic form of Occlumency, judging from Severus Snape's early lessons on the subject to Harry Potter, involves clearing one's mind — making it "blank and empty" — in order to prevent a Legilimens from perceiving one's emotions and thoughts. More advanced Occlumency involves suppressing only the thoughts, emotions, and memories that would contradict whatever it is an Occlumens wishes a Legilimens to believe; hence, it is not obvious that Occlumency is being used even if the person is lying. It requires a great deal of will power, as with resisting the Imperius Curse, as well as a high degree of mental and emotional discipline. It is also one method of resisting the influence of Veritaserum.

Occlumency is not part of the normal curriculum taught at Hogwarts School of Witchcraft and Wizardry and appears to be a rare and difficult skill.

Examples
In the 1995–1996 school year, Albus Dumbledore had Severus Snape teach Harry Potter Occlumency in an effort to prevent his mind from being penetrated and influenced by Lord Voldemort. Snape was a highly skilled Occlumens, being able to successfully deceive extremely accomplished Legilimens Voldemort, but his lessons with Harry were ultimately unsuccessful. Harry was not able to repel most attacks, though it is likely that the personal enmity between him and Snape as well as the stressful events in his life that year hindered his ability. He eventually gave up attempting to learn. Harry later managed to block his connection to Voldemort, on occasion, by focusing on feelings of love, rather than by using Occlumency.

Snape himself also employed Occlumency to hide his loyalty to the Order of the Phoenix from Voldemort, and due to his well-known mastery, both sides had difficulty trusting him.

In 1996, Bellatrix Lestrange trained her nephew, Draco Malfoy in Occlumency so that he could keep his mission to kill Albus Dumbledore a secret. Draco became skilled enough to repel Snape's attempts at Legilimency. Draco's success was due to him shutting out his compassion to become the bully he is, making it easy for him to close his mind.

Known Occlumens

 * Albus Dumbledore
 * Bellatrix Lestrange
 * Draco Malfoy
 * Horace Slughorn
 * Severus Snape
 * Lord Voldemort
 * Barty Crouch Jr.

Etymology
The word "occlumency" comes from occlude, "to conceal", and mens, Latin for "mind".

Behind the scenes

 * On the subject of Occlumency, J. K. Rowling has discussed why Draco Malfoy would be skilled at it while Harry Potter was not:
 * "...I think Draco would be very gifted in Occlumency, unlike Harry. Harry’s problem with it was always that his emotions were too near the surface and that he is in some ways too damaged. But he's also very in touch with his feelings about what's happened to him. He's not repressed, he's quite honest about facing them, and he couldn't suppress them, he couldn't suppress these memories. But I thought of Draco as someone who is very capable of compartmentalising his life and his emotions, and always has done. So he's shut down his pity, enabling him to bully effectively. He's shut down compassion — how else would you become a Death Eater? So he suppresses virtually all of the good side of himself."
 * Narcissa Malfoy may be an Occlumens, as she lied to Voldemort about Harry's demise without consequences. However, Voldemort may not have been using Legilimency on her at the time.
 * Gellert Grindelwald may also have been an Occlumens, as he lied to Voldemort about having owned the Elder Wand. However, this is unconfirmed.
 * According to W.O.M.B.A.T., it may be possible that Occlumency can guard against possession.
 * Voldemort employed Occlumency against Harry Potter to try and end the connection, but started to lose control during the events of 1997 and 1998.
 * There is an brazilan fan site called Oclumenccy http://www.oclumencia.com.br/

Notes and references
Okklumeus