do i buy tickets at train station or before? How much will I pay for first / second class? Is there a direct train? Is there a website to find timetables?
Yes, there are direct trains. Here is the URL for the English version of the Austrian Rail Web site: www.oebb.at/vip8/oebb/en. Use it to get timetables. Enter Wien and Praha rather than Vienna and Prague. You will see a reference to Sparschiene fares on the homepage. If you phone the call center and book in advance, your ticket may cost you as little as €19 (2nd class).