This answer doesn't really add that much to what is already here, but I felt that the answers offering solutions for hiding it lacked some information.

I personally use uBar and I've used the following set of terminal commands without any issues. I can only confirm that I've used these without any issues since El Capitan. I can't remember further than that for sure.

To be clear, this only hides Dock, so that you will never have to deal with it accidentally popping up.

For those who don't know, these lines of code should be run in Terminal. It can be found here: /Applications/Utilities/Terminal.app. Just open Terminal and paste in the lines and press enter.

# Hide Dock
defaults write com.apple.dock autohide -bool true && killall Dock
defaults write com.apple.dock autohide-delay -float 1000 && killall Dock
defaults write com.apple.dock no-bouncing -bool TRUE && killall Dock

# Restore Dock
defaults write com.apple.dock autohide -bool false && killall Dock
defaults delete com.apple.dock autohide-delay && killall Dock
defaults write com.apple.dock no-bouncing -bool FALSE && killall Dock

You can run each line separately as well.

Explanation on what each line does:

  1. First line turns on autohide
    • As someone mentioned, Cmd+Alt+D still toggles Dock visibility just like before. This is useful if you need to assign application to a specific space. Using the Dock is the only way (AFAIK).
  2. By default when Dock autohide is on, hovering over the edge where it sits shows the Dock pretty much immediately. This line Makes the hover delay 1000 seconds, making it pretty much impossible to accidentally show dock if you happen to hover over the edge. You'd have to let it sit there for ~17 minutes.
  3. This removes the bounce animation that happens when applications want your attention or when an application is launching. I've noticed that depending on the Dock icon size, they may peak from the edge when they start bouncing. This gets rid of that issue.

killall Dock at the end of each line forces Dock to quit and then it restores itself automatically. This is to basically load the new settings. It's only necessary to run killall Dock after the very last line, but this way it's easier to run the lines separately if necessary ...and in bulk it really makes no difference.