The Naples-Sorrento line stops at Pompei Scavi-Villa Misteri, which is the station very close to the excavation. Trains depart Naples for Pompei 2-3 times per hour during most of the day, and there are a few trains per day that stop at fewer points along the way - those trips are faster.