Trains are the best and most common form of mass transportation in Austria. Comfortable and moderately priced trains connect major cities and many towns; buses serve less significant towns and lakes. The two forms of transport are integrated and designed to complement each other, and intercity coaches exist but don't provide anywhere near the level of intercity rail service. Between Vienna, Linz, and Salzburg trains run every 30 minutes or even more frequently. Trains between Vienna and Graz operate hourly. The 2½-hour train ride takes you along one of the world's oldest mountain railways. 14 tunnels and 16 viaducts were built to cross the Alps.
Austrian trains are operated mostly by state-owned company ÖBB. The Raaberbahn (GySEV) provides some trains across the Austrian-Hungarian border and there are some short private railways with tourist trains which supplement rather than compete with the ÖBB.
The only competitor to ÖBB is WestBahn on the Salzburg-Linz-Vienna line (the company shares the name of the line it runs on). Westbahn serves several inner-city stations in Vienna that are otherwise only served by commuter trains, giving travelers more flexibility. While comfort is roughly equivalent, ÖBB Intercity and Railjet trains usually have a full-service restaurant car while Westbahn trains just have a couple of vending machines. Both offer free Wi-Fi.
ÖBB also operate buses (InterCityBus) on the Graz–Klagenfurt–Venice line because the road between these cities is much shorter than the railway.
On suburban and regional trains there is normally only second class. On ICE, IC and EC trains there are two classes. The RailJet offers three classes: Economy (second class), First Class, and Business Class.
The ÖBB sell domestic tickets using a price based only upon distance travelled, regardless of when you buy the ticket and which train you take. Base fare is rather expensive, but Austrian Railways offer some interesting discounts. If you buy a ticket from Salzburg to Vienna, that ticket is valid for any train that takes you to Vienna, even for a foreign train stopping inside Austria. (Exception being any train operated by WestBahn, you'll recognize these trains by their white livery with bright green and blue stripes.)
Tickets can be ordered (and paid for) on the web, including itineraries coving connecting trains and involving narrow-gauge, privately operated railways (like in the Zillertal valley). You can also reserve seats for a small fee: that is definitely recommended if you plan to travel with luggage, or if you're traveling as a family or other group and want to be sure you can sit together. Tickets ordered online should be printed and presented to the conductor onboard upon request. They should be printed since they will be barcode-scanned and stamped.
There are ticket machines at all sizable train stations and onboard some regional trains. When boarding regional trains you are required to have purchased a ticket before boarding, if it is possible to buy a ticket via railway office or vending machine at the station you are departing from. (This includes most stations. These stations are marked with SB in all ÖBB timetables). Ticket machines do not display or print itineraries, and many train stations only display basic timetables. It is best to find an itinerary on the Austrian Railways website trip planner. Stations also provide pamphlets with detailed timetables, but they assume that you know which line to board to get to your destination and can only be obtained during office hours.
Rail passes, ÖBB tickets and VORTEILScard are not valid on WestBahn; buy tickets on-line or on board. Westbahn generally offers fewer discounted tickets than ÖBB, but their full-fare, flexible ticket prices are generally cheaper than the equivalent ticket on ÖBB. Unlike ÖBB, it's fine to purchase a ticket on board the train, but this incurs a €1 surcharge. Seat reservations are free with purchase of a ticket. If you plan to combine your trip on WestBahn with a journey on ÖBB or another operator, through tickets are not available; you will have to work out the connection yourself and purchase two separate tickets. Besides the added hassle, this produces the further downside that you are not guaranteed the validity of your ticket in case a delay on one operator makes you miss your trip on the other and you may have problems claiming EU guaranteed passenger rights claims.