Shanghai is a huge city now with a population over 22 million, so it is very important to know its public tranportation here. There are metro, bus, plane, train, and bullet trains in Shanghai, which take millions of people moving in and out of Shanghai everyday.
Trains and bullet trains connect Shanghai with most of stations in China, it takes only 4-5 hours to Beijing by bullet train.
Flight from Shanghai to most of cities and some big cities in the world. There are two airports in Shanghai, Hongqiao and Pudong airport.
Metro in Shanghai is very convenient, covering most of Shanghai area including suburb.
Public buses are cheap but difficult to know which line you will take if you do not know Chinese.