Shortcut key for fullscreen mode
The button in the top right of each window is not for minimizing and maximizing the window, but for putting it in and out of fullscreen mode (which is why it covers the menu bar, as you said). 

The keyboard shortcut to toggle fullscreen depends on the application.

Most applications that I use on a daily basis (such as Google Chrome, Terminal, Mail, and Safari) use ^+⌘+F (Control+Cmd+F) to toggle fullscreen mode.

Unfortunately, not all developers use this shortcut in their applications. iTerm, for example, uses ⌘+Enter to toggle fullscreen mode. If the application you refer to does not use either of these shortcuts, you should look for the fullscreen option in the View menu or by searching for "fullscreen" in the Help menu.