Vat Phou is about 10 kilometers from the main part of Champasak, and about 50 kilometers from Pakse. There are a number of ways to get there from either city, so here's a quick overview of your options:
From Champasak
If you're staying in Champasak, many of the hotels and guest-houses have bicycles or motorcycles for rent. Bicycles will cost around 30,000 to 50,000 Kip (3.60 USD - 6.00 USD) per day, depending on the type of bike. There are no hills between Champasak and Vat Phou, so the 10 kilometers is a relatively easy ride. However, the road is potholed in several places, so expect some rough spots. A new highway was under construction in late 2011, so the trip may be smoother, if less scenic, in the near future. One advantage to bicycles is that you can take them into the temple grounds and ride them right up to the base of the hill.
Motorcycles are more expensive to rent, but offer the same advantages as a bicycle. If you want to leave all the work to someone else, you can engage a tuk-tuk - a three-wheeled taxi - to take you to the temple and back. There are, of course, private guides with air conditioned cars that can take you around. They can be booked at some of the hotels around Champasak.
From Pakse
Pakse is close enough that you can consider making a day trip to visit Vat Phou from there. You can book a packaged day trip from any of the travel agencies around Pakse, and this is the best way to ensure you get there and back. The cost is around 190,000 Kip (22.80 USD), which includes a guide and entry fees. The trip usually involves a boat trip down to Champasak, a tour of the temple, and then a return to Pakse by van. They typically depart at 8:30 am and are back around 2:30 pm.
You can do exactly the same trip on your own, although there's a risk you might miss a connection. Boats from Pakse to Champasak leave at 8:30 am and arrive around 10:00 am. The cost is 70,000 Kip (8.40 USD). You'll have no trouble finding a tuk-tuk at the boat landing to take you to the temple. For the return to Pakse, you can take a regular public bus, which leaves from ferry landing across the river from Champasak at around 1:30 pm and costs 50,000 Kip (6.00 USD). Your tuk-tuk can take you to the ferry crossing in Champasak after the temple. This gives you around three hours to visit the temple, which should be ample time. You may even have time for a riverside lunch.