I have bad news for those of you who think renting a machine from the grocery store and simply spraying down hot water and cleaning solution and then vacuuming it back up is going to fully clean your carpet. People clean carpets, not machines.
Okay, machines do make a difference--some are better than others, but to get your carpet clean and looking as good as it can look you're going to have to scrub.
Some machines come with a brush attached to a roller on the bottom of the machine. These can be difficult to use because getting enough pressure on the brush is a challenge. I recommend buying a brush that will attach to the end of a long wooden handle. With this, you can scrub each area after you put down the hot water and cleaning solution. You can also get the smaller hand-held brushes. These work well, maybe even better than the long ones, but you'll have get down on your hands and knees to do a good job.