Italian trains run main line services Porto Torres, Sassari, Olbia, Oristanto and Cagliari. There are many small gauge lines that mainly run in summer only.The state run FS is on www.ferroviedellostato.it and the private narrow gauge is www.ferroviesardegna.it In the picture can be seen the narrow gauge track shared with normal line.
Sassari may be reached by air: airport in Alghero - 1 hour by car, or Olbia - 2 hours by car. By boat, the closest harbour is in Porto Torres - easy connections to/from Genoa and others cities along the Italian and French coast. There's also a summer boat connecting Santa Teresa (Northern tip of Sardinia, 2 hours from Sassari) to Bonifacio (Southern tip of Corsica).
Forget about the trains, unless you are a lover. In this case, you will need to travel the 'coast-to-coast' from Bosa to Arbatax: the railway line is very old but it takes you along the wild countryside of Gennargentu mointains, as if you were trekking.
There are buses, but no one could day Sardinia is famous for efficient and quick public transport.
Sassari has good rail links to the rest of the island. A half hour journey on the narrow gauge track to Alghero for us, enjoyable.
See link to webpage for timetables
There is a regular bus service from Alghero airport, journey time around 30 minutes and cost is €3.50 (2008 Jan) See link to timetable
The return fare from Alghero to Sassari is Eu3.80 and the journey time about 33 minutes.
The last train back to Alghero leaves at 20:55.