Generally, in between smokes, I will clean the stem and stummel with two pipe cleaners. First, I take a bristle cleaner and run it through the stem. Then each end gets stuffed in the mortise with a brief scrub. Then I fold the pipe cleaner in half, and use it to clean the inside of the mortise, and then the inside of the bowl. Then I take a clean non-bristled pipe cleaner and run it through the stem a couple of times.
A deeper clean might happen once every couple of months, but if you're smoking the same pipe every day you might need to do this every couple of weeks, but it will involve a couple more pipe cleaners, and I will clean out the stem with a pipe cleaner dipped in high proof alcohol.
Techniques vary. Some people swear by the method of running hot water through the pipe immediately after finishing your smoke. But what I do works for me. There is no "right" way, just what works for you.