It makes you effectively unkillable. With god mode enabled, incoming damage does not reduce your health, so you cannot die under any circumstances.
It is a console command rather than a menu toggle, so you need to open the console with the tilde key and enable cheats first. Two things worth knowing: god mode does not stop knockback or fall positioning, so you can still get shoved somewhere awkward, and using it disables achievement progress in most versions of the game.