Agropoli has a train station on the Naples–Reggio Calabria line. Trenitalia runs frequent Regionale services from Naples Centrale; the journey takes about 1 hour 20 minutes to 1 hour 40 minutes depending on the service. The station is in the lower town, about 1km from the beach and 2km from the old town — walkable with light luggage, or a short taxi ride.
By car from Naples, take the A3 motorway south (direction Salerno-Reggio Calabria) and exit at Battipaglia or Eboli, then follow the SS18 coastal road south. The drive is about 1 hour 20 minutes without traffic. Parking in the lower town is easier than in the old town, where access is restricted.
From Salerno (the main hub for the Amalfi and Cilento coasts), Agropoli is about 45 minutes by train and around 30 minutes by car on the A3. CSTP buses also connect Salerno to Agropoli and the Cilento coast towns, useful for getting around without a car once you're in the area.