Is there train or bus service from Hallstatt to Innsbruck? It shows that there is on RS Austria planning map but when I search for that it shows a 4hr train ride back up through germany?
Yes there is train service. Little over a 4 hour trip. Use https://www.bahn.com/en
4 hours is about right. "Back up through Germany" is actually the fast way, since the tracks are level without many curves. The other way, through Schwartzach St Veit, Kitzbuehel, Woergl, takes over 6 hours. Realize that there are these little hills called The Alps that get in the way. If you had a car, you could do it in 2 3/4 hours.
You can look at timetables and book tickets from the Austrian Rail Company - OeBB. Here is the link - https://www.oebb.at/en
Hallstatt is a tiny town and Innsbruck is a large city, so changes are necessary on this journey.
Also, Hallstatt's train station is across the lake from the village, so you need to take the ferry first.
I am also visiting Hallstatt and would like information on travel. How far in advance should I book my Ferry and Train back to Salzburg. Or can I purchase tickets on the train?
In Austria you should buy train tickets always in advance, at the train station at the latest. You cannot buy a ticket from the conductor in local or regional trains, only in long-distance trains with a surcharge.
The schedule of the ferry is synchronized with the train schedule. Whenever a train arrives/departs in Hallstatt the ferry will cross the lake in time. There is no advance sale of ferry tickets, as far as I know.