Practice, practice, practice. Also, if you have a lot of different pipes they will smoke differently and you might need to learn a new rhythm for each pipe.
Overall you want to:
- have the tobacco dried out a bit (should neither feel wet nor dry to the touch, be springy, not crumble when pinched between fingers)
- make sure you don't pack too loose. The ember needs to progress through the tobacco while smoking. If you are using a 3 step fill method, the individual layers might not necessarily touch and you will lose ember between these layers quite easily. I found the easiest way to get a nice consistent pack is to take out a little bit more from a tin than you think fits the bowl, spread it on a sheet of paper ("dissect!" , I.e. really take the strands apart), let dry for 10 minutes. Then I create a little packet of tobacco, and twist that whole packet into the bowl (rotating). As the packet was a little more than fits the bowl you will have strands sticking out on top. Those I compress down until it fits just beneath the rim. Tuck the ends in.
- get a good even light across the whole surface. I.e., the whole surface glows and the charred surface is flat (no hills and valleys).
- only tamp when your smoke gets faint in the draw. Tamping has to be done sparsely and carefully, it's super easy to extinguish the ember when tamping down!
- keep a steady rhythm, depending on the blend, something like a 2 seconds draw every 8 seconds or so. It's okay for the pipe to go out if you rest it for a while. Some good blends you can rest the pipe for two minutes and its still burning, those are the exceptions.
I almost never have to re-light a pipe once its started. It's really a matter of experience I think to learn when to tamp, how hard and long to draw, how dense to pack, etc. and see how the pipe reacts.