The most important part of technique for a good, consistent tamp is to uses a good tamp. Many espresso machines, especially cheap counter-top ones for home use, come with a plastic or lightweight metal tamp. You really want one that's nice and heavy, as it helps you get good, even pressure.
Beyond that, the best recommendation I have is simply to practice. Tamp down onto a flat surface where you have room to lift your elbow and forearm so that you're pressing directly down onto the tamp and espresso grounds.
The biggest problem I see in terms of tamping issues is pressure that isn't evenly applied. The top of the tamped espresso grounds should be a smooth, level surface. If it isn't, keep practicing until you can press down evenly.
The other main problem is not enough pressure. If you don't tamp the grounds hard enough, the water will find the path of least resistance and won't penetrate the grounds evenly. Most people say to aim for 20-30 lbs. of pressure when tamping; pick a number somewhere in that range and practice on a kitchen scale or bathroom scale until you know what that kind of pressure feels like. Consistency is more important than the actual number here - as long as you're somewhere in that 20-30 lb. range, you should be good.