There are many variations on how to tamp and each person develops their own personal style to achieve
A basic tamping guide can be accessed on this link
There are a number of tamping methods;
Nutation is one method finding favour amongst some baristas, and involves 'wobbling' the tamper ever so slightly to seal the edges of the puck before compressing
Wikipedia entry for Nutation
Even distribution is an essential pre-requisite for a good tamp
Refer to the Distribution Wiki entry for further details