Difference between dig @www.google.com ns . and dig www.google.com ns
The two commands means something very different, which is why you get differering results.

This command:

dig www.google.com ns


means that you want to query your locally defined DNS server about NS records for the host www.google.com. 

The locally defined DNS server could be your ISP's DNS server for example. 
NS records are records describing which DNS servers hold authoritative records for the host.

The other command:

dig @www.google.com ns . 


means that you want to query www.google.com about the ns records for the name ".". As www.google.com is a web server and not a DNS server, you'll not get any reply to your query.

Then your final command:

dig @a.root-servers.net ns .


This means to query a.root-servers.net about ns records for the name "." (i.e. the most toplevel name, the root). "a.root-servers.net" is a DNS server, so it will reply to your query. It also happens to be a special DNS server in that it is one of the root servers that is in place specifically to give you DNS records for the root.