Just did this on Wednesday. Use Oyster but know it will ding you the daily maximum. So have more than £10 on your card or have cash or a credit card which works. Not that this happened to us or anything . . .
Hampton Court station is a little stub off the main line. It is one of two stations on the stub. Get a train where the last stop is Hampton Court. Get out with everyone else (i.e. during the week look for seniors and school kids in uniforms). follow the crowd to the palace. They are not going anywhere else. If you don't have a palace ticket, the ticket office is 50 m inside the gate on the left. Look for the Shop.
The Kitchen Garden is free (cut through shop and then car park) as are a few park-like bits, restaurant and ice cream guy. The Maze and playground are located in this area and cost. I think you can pay at the Maze to enter that. The Versailles-like garden is accessed through the palace, so requires a ticket.
If you want a little adventure, get any train going to Sheppertin and then change at either Raynes Park or New Malden. That's only necessary if you get on a train stopping at Hampton or Hampton Wick, neither of which are Hampton Court or are on the stub. It has to say Hampton Court, no other Hampton will do! Not that we did this or anything . . .
Coming back options are any train from Hampton Court or for an extra £7 or £9 you could take a boat ride to Kingston or Richmond respectively with Turks. Look left just before crossing bridge to go bak to station. It was a lovely trip and if you go to Richmond, you go through Teddington Lock which is cool for the engineering geek types but also because Monty Python filmed the Fish Dance here - for Python geeks. It was a very picturesque trip.
Trains from Kingston go back to Waterloo and as from Richmond you could get back to Waterloo for Baker & City or Northern or Bakerloo or get out one stop early at Vauxhall for Victoria line.