Tamping has nothing to do with etiquette, which is about decorum, manners, and proper behavior. It has far more to do with the practical matters of keeping one's pipe operational during smoking. :wink:
As far as figuring out when to tamp, there's as much art as science to it. Despite my own love of gathering useless statistical data with regard to my hobbies, there isn't really anything more than a general guideline for when to tamp, as the circumstances change with the pipe, the tobacco, the relative humidity, and the wind speed. Eventually, you'll get a feeling for when things are slowing down, which indicates that the smoldering ember is no longer in close enough proximity to fresh fuel, and it's at that point that a tamp becomes necessary. It smooshes things down gently enough not to extinguish the ember, and allows it to catch more of the unburned tobacco.
As for how to tamp, most recommend using the lightest touch possible, in order to avoid extinguishing the pipe. Some say gentle pressure, others insist that only the weight of the tamper itself should be used. Many suggest light pressure around the edge of the chamber, in order to push the tobacco surrounding the ember into the middle.
With regard to ash removal, some do and some don't. If you've accumulated enough ash that it's choking off the airflow, removing some is not a horrible idea, though I smoke large bowls and have only rarely needed to remove ash prior to the end of the bowl. Sometimes it's useful to get an idea of how much unsmoked tobacco one has left in a given bowl.