Getting a train is the easiest way as far as I'm concerned, I'm not sure if it's as long as 8 hours to get to Prague, but it might be as Polish trains move a lot slower than trains in the majority of Western Europe (except the UK of course!). I wouldn't recommend getting a bus because a train is far more comfortable, probably takes a lot less time to get there and isn't significantly more expensive. If you did want to get a bus however, then in Krakow station (in the old hotel off platform one where the ticket office is) there is an area selling bus tickets as well as train tickets - if you don't know any Polish, then any sign with PKP on it is selling rail tickets and PKS is bus tickets/information.
A word of warning however, if you're planning on buying your ticket there then you'll find that virtually nobody selling the tickets in the station will speak English because in Poland you have the situation where most people over about 25 don't speak English but under that virtually everyone does. Anyway, it can be a lot of hassle trying to explain exactly what you want to the ticket staff (even at the international journey desk) and also knowing which desk to go to (the international desk is on your right as you go into the PKP area I believe. Take a pen and paper and write your destination down (also remember that some place names have different spellings from the English, for example Vienna is Wien). Anyway hope that helps!