FERRY
There is no direct service from Naples to Amalfi so you could take one to Sorrento and then another one from Sorrento to Amalfi. You have to check the schedule of the different companies in advance, though, as they don’t operate during the whole year.
Here you can check the schedules of the different companies:
http://www.napoliunplugged.com/get-amalfi-coast.html
http://www.navlib.it/eng/acquistaonline/index.asp
What we actually did is to just go to the port and ask for the next ferry.
BUS
Another option would be to take a bus from the airport or the central train station in Naples to Positano.
http://www.positanoshuttle.com/
PRIVATE CAR
If you don’t have a tight budget you can also book a private car for your journey.
This is one of the companies offering the service: http://www.positanocarservice.com/
TRAIN
There is a Naples-Sorrento train which would be perfect for coming back to Naples especially if you catch the late one when it is already dark outside.
HOW WE DID IT
We took a ferry from Naples to Sorento. Then took the bus in front of the train station to Amalfi.
On our way back we took the ferry from Amalfi to Sorento and from there caught the late train to Naples. This allowed us to spend more time at the coast as the last ferries to Naples were leaving somewhat earlier. Plus you get to see the coast from different angles 😉