To enter secret codes you must have a Version 2. You obviously cannot enter codes in a Version 1.
To enter the codes, go to the shop. When you see the shop keeper, press "a" three times and the shop keeper will beep. Then input the codes. You can find those on the codes board.