A train from Shanghai is the easiest way to get to Hangzhou.
You can can catch a train from Shanghai Zhan Railway station in the north or from Nan Zhan South railway station. The one from the southern station is faster and goes to a train station closer to Xihu Lake, the biggest tourist attraction.
If you go from Shanghai Zhan Railway station then you will need to take a taxi or bus to Xihu.
If possible to take a taxi to and from Hangzhou, although you will have to negotiate a price.