Spells
Obliviate
Obliviate is a memory charm. Gilderoy Lockhart built his career on casting it at the witches and wizards who had done the deeds in his books. In the Chamber of Secrets he tries to use it on Harry and Ron. Ron’s broken wand reflects the spell, and Lockhart forgets who he is.

In the books
Harry Potter and the Chamber of SecretsChapter: The Chamber of Secrets
Lockhart tries to wipe Harry and Ron’s memories in the Chamber. The spell rebounds. He had already described memory charms as his method in the same book.