Why does this not work:
curl -X HEAD http://www.google.com
But these both work just fine:
curl -I http://www.google.com curl -
google.com is not responding to HTTP HEAD requests, which is why you are seeing a hang for the first command.
HTTP HEAD
It does respond to GET requests, which is why the third command works.
GET
As for the second, curl just prints the headers from a standard request.