Instructions
Open your emulator's Cheat Database function. For example, if you are using Visual Boy Advance, click the Cheats menu and select "Cheat List." If you cannot find your emulator's cheat database, check the program's website for documentation, and make sure it actually supports cheat codes.
Click "Add Cheat" or the equivalent button for your emulator. This should bring up a dialog that allows you to add Action Replay or GameShark cheat codes. Most emulators support either source interchangeably.
Find the cheat code you want from an online cheat database or a GameShark or Action Replay cheat code book and enter it in the window to add it to the database.