Looking at a Unblock-US Features (a DNS provider) on their website it states the following:


  Stay out of the radar of prying eyes.
  
  With Unblock-us, you’ll have peace of mind knowing that your ISP or
  government is unable to view your online activity. We only
  send a small percentage of data to the websites we support through our
  secure servers, and we never log or analyze any data passing through.
  
  The solution to this invasion of privacy? When you sign up for
  Unblock-Us, you’ll receive a new set of DNS codes to add within your
  device’s settings. Your true IP address will then be masked and you’ll
  be able to bypass any restrictions or spying implemented by your ISP
  or government, all with this simple switch.




So my question is: 

How can changing your DNS prevent your ISP or government from seeing your online activity?

If my understanding of how a DNS works is correct I don't see how these claims are possible

Essentially, it doesn't.

DNS servers let your computer look up where websites and other services are based on friendly names, by converting those to IP addresses. Your ISP provides this as a service, but knows precisely who you are, and what IP your computer has, so can easily look up to see that @user1 has made a request to look at google.com.

A third party provider knows what IP address your computer is on (else it couldn't reply to queries), and what sites you are looking for. If they are a free, registration free provider, such as OpenDNS, that's all they know. They can take a pretty good guess at your ISP, and probably your geographical location (since most ISPs assign IPs based on location), but they don't have direct access to your name, or to any other data you send to websites.

However, even when using a third party DNS provider, the actual traffic between you and websites goes over your ISPs network. In this case, they can see that @user1 visited 173.194.113.80 and made some requests. If the site is running over HTTP, they can even see that you requested pages from a specific host, thanks to header data such as Host: google.com in each request, and the specific pages thanks to the HTTP verb used (e.g. GET /search?q=dodgy+things). If the site is running over HTTPS, they just get the IP address, but that's probably enough for them to work out what site you were on, just not the specific pages you looked at.
