This command hides the entire GUI including all menus, health bars, etc. Note that this command will also hide the console - if you press your console hot key, type 'tm' and hit enter again (even though you cannot see the console), the GUI will be enabled again.
If the GUI is visible, executing the above command will hide it. If the GUI is invisible, executing the above command will show it again. As noted above, if the GUI is hidden, the console will also be invisible. Your console hot key will still open the console, it just isn't visible until you type the command in again.
ToggleMenus is simply a longer version (alias) of the TM command - it has the exact same function.