do I need to make an advance booking for a train from shanghai to hangzhou?
You can just go to the train station and buy a ticket. There are many trains from Shanghai to Hangzhou every day. There are also many train ticket sales offices throughout the city. If you want, you could certainly buy a ticket from them in advance.
No. Just go to railway station. Very important bring passport and enough cash to pay for ticket about 80-120 RMB depending on what class