On the main toolbar menu, you will see an “Apple” icon placed. Click on it, which will open a drop-down menu. Click the "System Preferences" from the list. A new window will appear on the screen.
In the System Preferences window, click on the “Dock” option, which will make some options appear in front of you, related to the dock. Look for the "Automatically hide and show the Dock" option and check the box placed against it. The settings for your dock have now changed, and it will now disappear whenever you point your mouse away from the dock bar.
In case you need to open a window, which is listed in the dock, just move your mouse pointer to the dock area and it will pop up from the bottom of the screen once again.