A pipe bomb is an improvised explosive device, which uses a tightly sealed section of pipe filled with an explosive material. The containment provided by the pipe means that simple low explosives can be used to produce a relatively large explosion due to the containment causing increased pressure, and the fragmentation of the pipe itself creates potentially lethal shrapnel.
Premature detonation is a hazard of attempting to construct any homemade bomb, and the materials and methods used with pipe bombs make unintentional detonation incidents common, usually resulting in serious injury or death to the assembler.
In many countries the manufacture or possession of a pipe bomb is a serious crime, regardless of its intended use. Wikipedia