http
/en.wikipedia.org/wiki/Proxy_server#Anonymizing_proxy_server
WHat you are doing in essence when you change your IP is 'Anonymizing'. Basically you are using another IP address to hide yours so that you can surf the web without them knowing who you are. Its not illegal at all and is pretty common in practice.