Passwords are given to Merlin by the Lady of the Lake after he completes a difficult task. When they are written on his Rune Staff the game will restore back to that state.
The Rune Staff is on the Options Screen, which is brought up by pressing Start. Move the Sword Selector to the staff and input the code by pressing the appropriate keys on the controller. Press Select to confirm a password and press Start to return normally.