Trains are limited, the price system is strange but the services are good and the scenery even better.
Sundsvall is easy to reach by Train. It's one of the most northern cities to be served by the fast X2000 trains to Stockholm.
A private line runs the track from Sundsvall to Östersund, which connects to trains to Trondheim in Norway.
There are also several trains to Härnosand. Further north trains go to Luleå and Umeå but these don't run direct.
A very good site to check uit the Swedish timetables is www.resplus.se
The main trainstation of Sundsvall is southeast of the citycenter. Southwest is another smaller station.
If you have a car, you can drive to Sundsvall if you want. The Dutch boys in my group shared a car and used it to get to and from Sundsvall, as well as around town during their stay. Parking doesn't seem to be too bad. But be careful about vandalism - the Dutch boys' car got wrecked a few times.
It's possible to rent a bike or buy a used one, and use it to get around Sundsvall. Some of the exchange students in my group rented bikes and used them to get to class in the morning. Some people rented them from the landlord of the university student residences (StuBo), and they said it wasn't expensive.
There are many ways to get to Sundsvall. You can take the bus or train, or even a small airplane.
I flew from Montreal to Paris to Stockholm. When I arrived in Stockholm, I took the train from Stockholm to get to Sundsvall, and it took a few hours. It's best to buy a ticket in advance, because it's a lot cheaper that way. You can buy them at the counter, or if you have the right bank card, you can buy them from a machine in the train station or airport. My bank card didn't work in the machine (it had a 4-digit pin, but I don't think a non-European card works for train ticket machines), so I boarded the train and paid while I was in the train.
Everything is within walking distance in Sundsvall, so walking is one of the best forms of transportation (especially downtown). There are also public buses and taxis. The buses don't run late at night, so taking a taxi is best during that time. The bus is cheap, usually 16 SEK for a ride. Taxis are more expensive.