It was originally developed with the U.S. Navy in mind, for the primary purpose of protecting government communications. Today, it is used every day for a wide variety of purposes by normal people, the military, journalists, law enforcement officers, activists, and many others. (Link)
Tor works by routing users' traffic through a series of intermediary servers, encrypting and decrypting it along the way in layers -- what is known as "onion routing." This provides a level of anonymity for dissidents and people looking to subvert censorship.
That anonymity, however, also enables actions like drug sales, money laundering and hosting of child pornography. In addition to the Tor software itself, users can utilize "hidden services" -- sites that are often served with a .onion address. Those include Tor Mail, a popular service thought to have been compromised.