Pipe dope, or pipe joint compound, is a gooey compound used to seal the connection between threaded pipes and fittings. Because the threads in pipes and fittings still leave an air gap between the two surfaces, the gap must be filled to make it water tight (or gas tight for gas lines).
Pipe dope has been around for a very long time and tends to be the favorite product for professional plumbers. Teflon tape is also used to seal pipes threads and tends to be the favorite with homeowners because it is less messy than pipe dope. The two products can be used interchangeably, with a couple of exceptions. For gas fittings, you may use pipe dope, but when using tape, you must use Teflon tape that is rated for gas lines. Also, pipe dope should not be used on plastic threads, unless the container identifies it as safe for use on plastic pipe.
Pipe dope is non-hardening and works as both a sealant and a lubricant. This is useful for unthreading pipes if the need arises and so gives it some advantage for that reason. However, because it is a lubricant, it can allow for over-tightening of plastic pipe which can lead to cracking and breakage. For this reason, Teflon tape is often used on plastic pipes such as those used sprinkler irrigation systems.
To apply pipe dope, simply swab a coat onto the threads of a male fitting using the brush applicator supplied with the container. Make sure all the threads are covered and avoid applying dope over the end or inside the fitting. Thread the pipe or fitting and tighten. The joint should be water tight and resist leaking even under pressure.