The best way to reach the Amalfi Coast is to take a train to Naples27 or Salerno train station29 and then get on one of the local buses that will take you to the main coastal towns. The only town on the Amalfi Coast that has a train station is Vietri sul Mare, but this is at the eastern-most edge of the Amalfi Coast. You can get direct trains to Vietri sul Mare from Naples and Salern
FROM THERE YOU NEED TO TAKE A BUS. All train stops offer tickets and you can also buy tickets on the italianrail web site and get emailed tickets
I hope that helps