For PC games that use a developer console, the process usually starts with the tilde key (~), typically found in the top-left of your keyboard. Pressing it opens the console where you can type commands.
From there you enter the specific code the game uses, then hit Enter to activate it. Some games require you to type a command to load a particular map or level afterward.
Don't panic if you see an error message. Often you can simply resume or start a new game, reopen the console with ~, and try again. Exact codes vary from game to game, so check a reliable source for the title you're playing.