The easiest way to get from Václav Havel Airport Prague to the main train station (Praha, hlavní nádraží, sometimes abbreviated to Praha, hl. n.) is to take the Airport Express (AE) bus. It stops right in front of the arrival hall (a bit to the right, the last bus stop) and takes you directly to the main train station which is the terminus. You buy the ticket from the driver for 60 Kč (about EURO 2.5, but the driver does not accept foreign currencies, so you have to exchange money at the airport, try to have a 200 Kč note or less). The ticket machines at the stop do not sell this ticket.
Timetable here.
More info here. The bus journey is about 40 mins. From the Prague main train station, you can then take a train to Olomouc hl.n. (Olomouc main train station), which takes about 2.5 hours.