They removed that capability from Unity, as far as I know, so as handuel said: you can't... but.
There is thogh a custom build of unity that re-enable a similar behaviour, in which the dock will hide only when it would collide with a window. This is not official code from Canonical, but it comes from an, IMHO, very reliable source, webupd8.
You can install such a patched version of Unity (from webupd8 great repositories):
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
And then, to get the "real" Unity Dodge Windows
sudo apt-get install unity-dodge-windows
Once installed, press ALT + F2 and run:
Source, from webupd8: http://www.webupd8.org/2013/02/how-to-get-unity-launcher-window-dodge.html