You need a cable cutter. All of the companies that make tools for bikes make them. Here are a few options:
http://www.parktool.com/product/professional-cable-and-housing-cutter-cn-10 http://pedros.com/products/tools/brakes-and-shifting/cable-cutter/ http://www.performancebike.com/bikes/Product_10052_10551_1030380_-1___400625
As some of the other answers/comments have pointed out, it's a good idea to stick an awl (I use a fine-point nail set for finishing nails) in to the cut end of the housing after the fact to clean it up.
For the inner cable, the cable cutters will cut it cleanly with no prep or clean-up needed. If you're going to use a pair of regular wire cutters, then you'll want to use the solder trick mentioned in other answers.
That being said, you really should replace the housing when you replace the inner cable. It's rare for the cable to be worn to the point of needing replacement without the housing also needing to be replaced.
Alternately, you can use a Dremel tool with the cut-off wheel. Some people swear by this approach: