Train
Take the train Sc at the station Praha Hlavni Nadrazi .1
The journey takes approximately 3 h 4 min. Ticket price is about 9–40 EUR. The travel distance is 351 km.
Carrier is Czech Railways (ČD).
Get off at the Ostrava Hlavni Nadrazi
Night train
Take the nighttrain RegioJet at the station Prague, hl.n. .
The journey takes approximately 3 h 24 min. Ticket price is about 16–27 EUR. The travel distance is 351 km.
Carrier is RegioJet.
Get off at the Ostrava, hl.n.
Drive
In a rental car
The drive will take 3 h 31 min.. The distance between Prague and Ostrava is 375 km. You will use 30 liters of gasoline at a cost of €39.
See on this site which rental company has the best deal.