The Tor network is essentially scaled up version of a proxy service. It bounces your signal (IP address) through other users and servers encrypting parts of the packets sent when you try to access a website but only the final location (i.e the webpage that you're trying to access) has the full decryption key.
Think of it as a string of code or sentence.
- The quick brown fox jumps over the lazy dog.
You're trying to send this sentence to me secretly. You then encrypt it and send it through 5 other computers in the Tor network which all encrypt a part of it.
And they cannot read it, just take it, encrypt it and send it forward to me with the key to decrypt their encryption.
So, when it arrives to me it arrives with 6 decryption keys - the 5 from the computers it went through and the final key from you. I take them all and decrypt the message.
The dark (AKA deep) web is hosted on the Onion network and the Tor browser is just used to access the Onion network, so that noone can track you or your orders while you're in the Onion network.
Think of the Tor browser as a trading terminal. You just use it to access the market. It's not the market... and it's not illegal or dangerous.