There was a thread here before about changing DNS and lets you access a blocked gambling site but that must be illegal because this can be the same as using a VPN and many gambling sites don't allow VPN.
Changing your DNS settings is very different from using a VPN to access restricted websites. The Domain Name System (DNS) is basically a tool for translating the user-friendly host names (e.g. domain name) into numerical IP address formats understandable by computers. When you change your DNS settings, you are essentially changing which server your DNS requests are going to. The DNS server you use to access the website does not matter from the host's perspective.