To get there from Phetchaburi town centre, turn right at the entrance of Phra Nakhon Khiri Historical Park, then just follow this road (straight) for the next 5 km. When the road forks at the end you need to go up the hill, where there is a car park and lots of monkeys hanging around.
There are plenty of small stalls selling drinks and snacks and they will look after your car or motorbike from the monkeys. They have big crocodile toys to scare them off!
Obviously they expect you to buy a drink or two from them when you get back from the cave.
The cave entrance is just a short walk from the car park up some steps, before descending down once you get into the cave.