Onion Routing
Onion routing was designed to provide complete anonymity to a connection. It accomplishes this with encryption. Three layers of encryption. When using the Tor Network a path is determined with a minimum of 3 nodes (can be more). Encryption keys are setup and exchanged between you and all three nodes. However, only you have all of the encryption keys. You encrypt your data with each of the nodes' keys starting with the last node's (exit node) and ending with the first (entry node). As your data moves through the network a layer of encryption is peeled off and forwarded to the next node.
As you can see the exit node decrypts the last layer, and forwards your data to its destination. Which means your data is in "plaintext"1 at this time, but complete anonymity is accomplished. With at least 3 nodes no node knows both the source and destination.
Anonymity not Security
Tor does not promise secure communications. Encryption is only used to provide anonymity between nodes, your data is not encrypted otherwise. This is why it is still highly encouraged to use HTTPS enabled websites while using Tor. As @LieRyan mentioned in another thread's comment, sending personally identifiable information through Tor without using other security measures will break any anonymity that Tor provides.
Traffic Visibility