Type these during the actual mission and when typed correctly, you will see a confirmation around the top left of the HUD.
Typing the immortality code twice will deactivate it.
Cheat Effect
iddqd = immortality
nextpart = following segment in the mission
nextmission = Automatically complete the mission
maxrockets = missles/rockets refilled
Here is a nice site for more info