The transportation options available to you are too complicated for me to describe in detail here. Salerno, the big city north of Paestum, is the nearest transportation hub. From Naples or Sorrento you'll change buses or trains in Salerno to get to Paestum.
But what you need is a more detailed description of the several transportation options, and--guess what?--Rick's book Italy describes your options in detail.
The highly summarized version of your choices is:
1) Salerno to Paestum by bus
2) Salerno to Paestum by train
3) Naples to Salerno by train, and then to Paestum by bus or train
4) Sorrento to Salerno by bus, and then to Paestum by bus or train