Look at the "How to's of Train Travel in Italy" Post at the top of this section of the forum. You'll find the info you need in there.
It is not very far via train to Pisa form Liverno, but getting to the train station would be nearly impossible. They do run a shuttle bus to the town center where you can take bus route #1 to the train station. Or you could ask a taxi if they will take you to the train station. We had a group of 4 people that we shared a taxi ride with but it was still pricey.
I've used the bus from near where the shuttle drops you off to get to the rail station....its pretty easy but you do want to get an early shuttle if possible and you will need to use euros to buy your bus ticket.
Yes, no that i re read my post.... what I meant was that getting from the port to the train station on FOOT would be near impossible. The shuttle bus and then the city bus to the train station is very doable. Sorry if I mis-lead your