Disassemble your pipe if the specific type allows you to do so.
Shake the pipe pieces out to remove any ash and other loose debris. This makes it simpler to focus on the tar buildup.
Soak a pipe cleaner in rubbing alcohol and use it to scrub out the inside of the pipe components. Glass pipes can be immersed in rubbing alcohol but this will damage the components of a wooden pipe.
Spit on any stubborn tar stains and apply a toothbrush to the stains. Saliva helps break up tar and the brush friction combined with the spit will help keep your pipe clean.