Most aircraft either have a single motor or a number of motors evenly divisible by 2 (2, 4, 6 etc.). Odd-number engine counts such as five and seven are possible, but only tri-motor aircraft saw significant production in the odd-count, multi-engine category.
There are two main reasons for going the three-motor design route. One has to do with safety. In the days when reciprocating engines were the norm, reliability of such motors was often questionable. In the early days of aviation, motors were comparatively crude and their design imperfectly understood. By the 1940s, engine design was pretty well understood, but reliability was compromised by the quest for ever more power. In the case of radial, air-cooled motors, the route to more power was through adding cylinders and accessories such as turbocharging. The result was complexity that led to unreliability that plagued aircraft such as the B-29 bomber and Super Constellation airliner.
So, if four engines couldn't be justified, then why not have three if the loss of one motor on a two-motor plane was too risky.
Actually, this implies that only one working motor might not have the power to maintain flight. And this is the second reason for tri-motor craft: in many cases (especially in the years around 1930) two motors weren't really sufficient to power large (at the time) transports and bombers.
Tri-motor aircraft have some disadvantages. The odd engine count precludes having engines driving propellers turning in opposite directions in order to cancel out torque effects imparted by propeller rotation. A motor mounted at the nose of an aircraft usually impaired visibility for the pilot. Post-World War 2, the center engine would also occupy space that would ordinarily be used by a radar set.
The initial heyday of tri-motors was the early 1930s. Three-engined jet airliners were common for a number of decades starting in the early 1960s. But that's a subject for another time.
Below is a gallery of tri-motor aircraft in the years before 1950.
Ford Trimotor and three-engined Boeing 727
This photo was taken in 1964 or 1965 showing both planes in American Airlines livery. I saw this restored Ford at the 1965 New York World's Fair.
This was a rival to the Ford. Pictured here is the one flown by Sir Charles Kingsford-Smith on some of his long-distance flights. It also was the type of plane that crashed, killing famed Notre Dame football coach Knute Rockne. A factor in the crash was Fokker's use of wooden construction for the wings, spelling commercial doom for the F.VII: Fords were all-metal.
Yet another high-wing monoplane tri-motor.
This was a low-wing tri-motor representing a trend away from high-mounted wings for monoplane transports. Several airlines used it during the mid-1930s, as indicated here.
Pander was small Dutch aircraft company (Wikipedia entry here) that built the S-4 as a prototype fast mail plane. It was perhaps the sleekest piston-engined tri-motor ever built, but unreliable. It was destroyed in a crash in the 1933 London-Melbourne competition.
The Ju 52 (alias Tante Ju) was by far the most successful piston-engined tri-motor, nearly 5,000 being between 1931 and 1952.
Both bomber and transport versions were built of this general design. Three motors were used for the bomber because Italy lagged behind Germany, Britain and, to a lesser degree, France in engine horsepower.
Three-engined planes were considered passé after World War 2, yet for some reason Northrop produced the archaic-seeming YC-125 in test-batch numbers.
This flashy prototype jet attack bomber classifies as pre-1950 because its first flight took place 28 October, 1949. The "T-tail" and positioning of the forward engines are tell-tales of the influence of World War 2 German design as well as active participation by Hans Multhopp who helped design the Focke-Wulf Ta 183 fighter that was never built, but influenced the later Saab J-29 (Sweden) and MiG-15 (USSR).