theboz is on the right track, but there are so many other variables that nailing them all down takes experience and practice. Sipping is going to be your biggest ally when smoking, but packing plays a huge role as well. Pack too tightly and your draw will be restricted, forcing you to pull harder to get the smoke through the pipe. Pack too lightly and your blend will (usually) burn quickly causing the pipe to get hot. By hot, conventional pipe wisdom (read: no one knows who came up with this) is that if you can't hold the pipe to your cheek for at least five seconds, it's too hot. Remember, your hands are far more sensitive to changes in temperature, so don't trust them.
As theboz alluded to, moisture content can play a part in heat issues. Drying tobacco is part of my ritual when preparing a pipe. I prefer it to be drier as I can always give it a little moisture by breathing on it. Ambient moisture can affect pipes as well. If it's really humid in your house or outside, your smoke can be affected by it, causing heat issues.
Also as has been mentioned, certain types of tobacco burn hotter than others, but cuts of tobacco can affect it too. A shag or ribbon cut will burn faster and hotter than a cube cut flake.
I could go on and on, but I'll leave you with this article which helped me when I started a few years ago:
THE THERMODYNAMICS OF PIPE SMOKING (Thanks to the author, Neill Archer Roan for writing it, and Lawrence for linking it for me all those years ago.)
-Jason