We plan to spend a day and overnight in Hallstatt after a week in Salzburg. What is the best way to get to Hallstatt from Salzburg?
Either buses or train/ferry requires two connections. You already have the train schedule link and I'm pre-disposed to using trains. See also these discussions of the bus route:
https://community.ricksteves.com/travel-forum/austria/how-to-get-back-to-salzburg-from-hallstatt
https://community.ricksteves.com/travel-forum/austria/munich-to-dachstein-salzkammergut
https://community.ricksteves.com/travel-forum/austria/ticket-for-bus-from-hallstatt-to-salzburg
Best is a subjective term. Fastest? Least expensive? Most scenic?
You can take a train to Attnang-Puchheim, then another train to Hallstatt Bahnhof (across the lake from Hallstatt), and the boat across to the town. Or, you can take a bus directly to Bad Ischl and then the train to Hallstatt Bahnhof. Or, you can take the bus to Bad Ischl and continue on the bus to Lahn, south of town, and walk ½ km on the pedestrian road into town. There are many, probably less expensive, places to stay in Lahn; then the bus gets you closer to your accommodations. In my case, in 2009, I took a longer, maybe more expensive, but more scenic all-bus route via Mondsee, St. Gilgin, and Bad Ischl to Lahn where I was staying.
Almost any route, except the one I took, will take 2-2½ hours.
According to the OEBB website, taking the IC to Attnang-Puchheim and a regional train from there will cost 27,20€/person one way. I'm not sure what a one-way, all regional ticket would cost, but if you take only regional trains, the trip will take close to 3 hours, but two to five people can travel on an Einfach-Raus-Ticket for 35€. My all bus route cost just under 20€/person in 2009.
I've not taken the all rail route to Bad Ischl, but the all-bus route was very scenic, and I stopped in Mondsee to see the SOM wedding church.
I've only taken the train on that route, and I felt that was the "best way". As mentioned you'll first travel to Attnang-Pucheim and then transfer to the train to Hallstatt Bahnhof, which is across the lake from the town. When you arrive at Hallstatt, walk down to the trail to the boat dock (it's easily visible) and then wait for Stefanie to take you across to the town. The boat fare is only a few Euro (can't remember the exact amount as it's been a few years).
You might want to have your Camera at hand when you arrive at Hallstatt, as the view of the town from across the lake is fantastic.