Several train stations, the newest of which is Hongqiao Railway Station, right next to Hongqiao Airport, serve Shanghai well. You can hop a train to Guangzhou (7 hours), Beijing (5 hours), Nanjing and Shaoxing (1½ hours), Hangzhou (45 minutes), Suzhou (25 minutes), as well as a few other nearby places. The G- and D-trains are the fastest and the only type you’ll want to board. You’ll need your passport to buy tickets, which, outside of Chinese New Year and Golden Week (first week of October) can generally be purchased day-of at the station. Popular routes like Shanghai–Beijing can sell out in advance, so it's best to book these a few days prior to your trip.