Harry Potter and Severus Snape's private lessons

Occlumency was a class taught to Harry Potter by Severus Snape, under the insistance of Albus Dumbledore, under the guise of Remedial Potions. They were cancelled when Harry saw a memory of his father hanging Snape in the air by his ankles and was caught by the Potions master.

Because of Harry's great love, he was never able to get the hang of Occlumency, but could cancel out Voldemort if he felt grief (or love, as Dumbledore puts it), like about Sirius's death or Hermione being tortured.

Appearances

 * Harry Potter and the Order of the Phoenix (first appearance)
 * Harry Potter and the Order of the Phoenix (film)
 * Harry Potter and the Half-Blood Prince (mention only)