Although I have set "Auto-hide the Dock" to On, the dock does not disappear. The icons on the desktop move a bit to the left so that they are partly covered by the dock, but the dock remains there as long as there is no maximized window covering it.
The first picture shows an extract of my desktop with auto-hide on, the second with auto-hide off.
The third picture shows what I wanted and what I got through @pomsky's answer.
Best Answer
That is the default behaviour. Ubuntu dock uses "intellihide" mechanism (i.e. dodges windows only) when it is set to auto-hide.
If you wish to keep it hidden until mouse-hover, open Terminal and run the following