The more loose dirt you can vacuum up at this stage, the easier the rest of the job will be.
Treat any spot stains by spraying a stain remover. Let it soak in for ten minutes then wipe it up with a damp cloth. Work from the outside of the stain towards the middle.
Once you have treated all your spot stains, give the carpet another vacuum.
Fill the steam cleaner with a mix of lukewarm water, carpet detergent and anti-foam.
Start in the corner of the room that is furthest from the door. Pull the cleaner across the carpet in straight lines, working towards the door.
Once you've finished, give the carpet a few hours to dry before you put any furniture on it.