When I was young I could buy a straw filled with bubble gum. Unlike an empty straw, I could bend the straw with gum without kinking the straw. The gum was working basically the same way a mandrel works. Most commonly a mandrel bend of metal pipe or tube is done on a rotary-draw, pipe-bending machine.
The picture below shows the components needed to produce a mandrel bend (except the metal tube or pipe itself.) After clamping the tube or pipe with the clamp die, the bend die body rotates up to 180 degrees supported internally by the mandrel and externally by a pressure die and a wiper die.
A mandrel most often refers to tooling put inside a pipe or tube to help it keep its shape during the bending process. Mandrels can have additional ball-shaped steel to allow the mandrel to remain inside even the curved section of the bend during the bending process. The picture above shows a 3-ball mandrel.
This type of equipment can create tight 2D bends, i.e. bends whose center line radius is as small as twice the outside diameter of the pipe. For example, 6in OD pipe can be bent to a 12in center line radius. Square and rectangular tubing can also be bent on rotary draw machines with the appropriate mandrels.
With the right equipment, operator, material and process, pipe and tubing can be bent as easily as bubble gum.