You will probably arrive by airplane either at Rome, Fiumicino Airport (FCO) (named "Leonardo Da Vinci"), or at Naples, "Capodichino Airport".
In both cases you will find here after the instructions (A or B, respectively) to reach by train the Salerno Railway Station (Salerno), unless you arrive in Capodichino and can profit from the direct bus Capodichino-Salerno (see B* below). If you arrive by bus in Naples, you can directly read instruction B2.
Once in Salerno you may reach Vietri by bus. Take bus n. 4 or bus n. 9 from Salerno Railway Station to the first stop in Vietri. You should buy the ticket ("UNICO Salerno", also called "urbano") at the railway station's newsagent or at the CSTP office, and stamp it on the bus. Remember that the ticket is valid for 90 minutes.
Another possibility is to take a taxi at the cost of about euros 10,00 from Salerno Railway Station Square directly to Vietri