You'll need to pause the game first, then input the cheat codes from the pause menu — they won't register during live play.
If you're after specific codes, a dedicated cheats site or the game's manual is the quickest place to find a reliable list.