An excellent tamp is key to making great espresso on a home machine. I Need Coffee's visual tamping tutorial guides you through the tamping essentials.
This part seems particularly useful if you want to get consistent espresso goodness:
The goal with the tamp is to place even extraction with about 30 pounds of pressure. You can use a bathroom scale to measure how much weigh you are putting into a tamp. It is more important that you develop a consistent pressure in your tamp than it is to always hit 30 pounds of pressure. Your arm should be straight so the tamper makes contact with the coffee bed evenly.
Other espresso brewing basics like weighing the coffee and using the right grind still apply, but keep practising your tamping technique and your shots will keep getting better.
Espresso Tamping Visual Tutorial [I Need Coffee]