Train travel in Italy is quite easy and not expensive. You do not need to buy ticket much in advance. You may want to do it a couple of day before if you choose a fast train (ES = EuroStar) which ticket will give you a reserved seat. Trains run frequently between the major cities (like every hour or so) and reach practically all towns of Italy, even small ones.

Click to see the

official Italian railroad timetable