there is no hydrofoil to Pompeji. The best way to go there is to take the train Circumvesuviana, Line Napoli - Sorrento. In about twenty minutes you will be at Pompeji Scavi. Entrance is Piazza Anfiteatro.
You can take the train to Sorrento after visiting Pompeji. From S. you can go to Naples by hydrofoil.