If you're playing the DS version of Need for Speed Underground 2, the general approach is to launch the game and, once it reaches the "Touch screen to begin" prompt, tap to start. From there, cheat entry typically happens through the in-game menus, and you'll often hear a confirmation sound when a code registers.
The most important thing is to make sure the cheats you're using are meant for your specific console, since codes differ between platforms. Check a version-specific guide for the exact entry method.