This command enables and disables (toggles) 'immortal mode'. When in immortal mode, your character will not be able to die (health will not reach 0). Unlike god mode, when in immortal mode your stats like stamina and Magicka are still drained/affected as they would normally be.
If immortal mode is disabled, the above cheat will enable it, making your character unable to die. If you have already enabled immortal mode, executing the above command will disable it.
ToggleImmortalMode is simply a longer version (alias) of the TIM command - it has the exact same function.