Under the Whyte notation for the classification of steam locomotives, 0-4-0 represents one of the simplest possible types, that with two axles and four wheels, all of which are driven. Generally speaking, those two axles are linked with side rods and form a single driven set.
Arrangements where all the wheels are driving wheels are generally used for switchers (UK: shunters) since they use all the locomotive's weight for traction, but have no leading or trailing trucks for stability at speed. 0-4-0 locomotives could either be tank locomotives or tender locomotives, with the former more common in Europe and the latter in the United states, except in the tightest of situations such as a shop switcher, where overall length was a concern.
By 1900 or thereabouts, the 0-4-0 had been superceded worldwide as the standard small switcher type by the 0-6-0, since the possible tractive effort of an 0-4-0 within normal axle load limits was not enough to move more than a couple of cars. The type continued in production, though, for use where a larger 0-6-0 was not suitable. An 0-4-0 could always negotiate tighter radius curves than the larger locomotive, and its shorter length was sometimes also an advantage, so it was commonly imployed in dockyard work, switching industrial street trackage, as shop switchers, and in industry.
In the United States, the Pennsyvania Railroad kept producing 0-4-0s long after all other major railroads had abandoned development of the type, building their final A5s class into the 1920s. The A5s was a monster among 0-4-0s, larger than many 0-6-0 designs, with modern features found on few others of its type: superheating, power reverse, piston valves, and many others. The Pennsy built it because it had a large number of confined and tight industrial branches, more than most other railroads.
There are 0-4-0 diesel locomotives too, though small in number. The very smallest diesel switchers were of this arrangement; few were built in the United States at all, but small numbers were built in Britain and Europe for places where their small size was called for.