Kanchanaburi is relatively easy to get to, although it is in that zone of places that are a long way from Bangkok, yet too close to for a flight to be practical. That leaves the train and bus as the two most practical options for getting to Kanchanaburi.
An old train in front of Kanchanaburi's main railroad station.
Kanchanaburi by Train
For some, the idea of traveling the route of the old "death railway" to Kanchanburi is appealing, and using the train for at least one way of the journey is something I'd recommend, although the trip from Bangkok to Kanchanaburi is more pretty than dramatic. For real dramatic scenery, try a day trip from Kanchanaburi to Nam Tok and back. One important point to remember is that regular trains to Kanchanaburi and beyond leave from Bangkok's Thonburi train station, rather than the main station of Hua Lampong.
Also note that there are two train stops in Kanchanaburi town. The main station is near the center of town, while there is a second stop at the bridge on the Kwai Yai river (see map). Try to find out which on is closer to where you're staying, as they are more than 3 kilometers apart.
There are at least two trains a day between Thonburi to Kanchanaburi. Around holidays and special events, there are sometimes additional trains (and some of these may leave from Hua Lampong). The trip to Kanchanburi takes around three hours and costs 100 Baht (2.60 USD).
Kanchanaburi by Bus
Buses are the faster but less scenic option for getting to or from Kanchanaburi. You can get buses to Kanchanburi from either the Southern Bus Terminal or the big Northern Bus Terminal at Mor Chit. The travel time to or from the Southern Bus Terminal is right around two hours, while Mor Chit will take about 30 minutes longer. Note that buses to or from Mor Chit are less frequent, about every two hours or so. All buses arrive or depart Kanchanaburi from the same bus terminal in the center of town. Expect to pay around 120 Baht (3.12 USD) for a bus.