The Mallet Locomotive is a type of articulated locomotive, invented by a Swiss engineer named Anatole Mallet (and thus, the name is properly pronounced in the French manner, "Mallay").
In the Mallet locomotive, there are two powered trucks. The rear is rigidly attached to the main body and boiler of the locomotive, while the front powered truck is attached to the rear by a hinge, so that it may swing from side to side. The front end of the boiler rests upon a sliding bearing on the swinging front truck.
Mallet's original design was a compound locomotive, in which the steam is used twice, first in a set of high-pressure cylinders, and then in a set of low-pressure cylinders. This confers certain thermodynamic advantages, and also worked well with the Mallet design. Steam was fed from the steam dome down to the aft, high-pressure cylinders - the exhaust steam from those being fed forwards in a pipe with a swivelling joint - to the forward, low-pressure cylinders. The exhaust steam from the larger low-pressure cylinders is exhausted through a slit in the sliding bearing in the top of the swivelling truck and thus to the smokebox above, and the blastpipe and chimney.
Purists consider only compound locomotives to be true Mallets, but especially in the United States many non-compound ('simple') locomotives of a similar pattern were built. Unfortunately no good name for this design ever emerged, and they tend to get called 'Mallets' nonetheless, or 'articulated' which is a little too non-specific. Unlike the case of the rigidly-framed locomotive, the Mallet design is more complex to build simple than compound, since then steam pipes and exhaust piping are needed for both pairs of cylinders.
Mallet's original design was intended to allow a medium-size locomotive to better negotiate the tight curves of a narrow gauge railway, but the Mallet design grew to enormous size in the United States, where it was used to permit locomotives to be built to sizes impossible with a single, rigid frame. The 4-8-8-4 "Big Boy" type used by Union Pacific Railroad is generally regarded as the largest steam locomotive in the world. However outside North America, the Mallet type had generally been superseded by the Garratt locomotive by the mid 1920s.