In order to enter cheats on GTA IV, press up on your controller to bring up your phone. Press up again so you can dial the numbers. Enter any of the codes below (there's no limit to how many cheats you can activate) and vehicles spawn in front of you, you recieve your weapons or whatever, depending on the cheat you activate. Also, to save you having to dial numbers over and over again, a cheat menu will appear in your phone and you can just select the cheat you want as long as you've dialed it once.
NOTE! VERY IMPORTANT - Cheats can prevent you from earning achievements. If you do use cheats but you want achievements, do NOT save your game once a cheat has been entered.