Just using Tor to browse the Internet is not illegal. Hiding your IP address and browsing history is not, in and of itself, illegal.