On the Nintendo DS, entering cheat codes for Animal Crossing requires a special accessory. You'd need a device that fits into the DS game slot, commonly known as an Action Replay or a similar cheat cartridge.
With one of those in hand, you can load codes to tweak the game. Just note that using such devices is optional and purely for players who want to experiment.