Before the first jetliners appeared, all airliners used piston (reciprocating) engines, which were astoundingly prone to failing in flight, to the point where an inflight engine failure was an everyday, expected occurrence. To quote Wikipedia:
Engine failures were considered fairly routine events on piston-engined airliners in the 1940s, so the crew elected to continue the flight to Dallas, and Captain Claude announced to the passengers that they would switch to another airplane upon arrival.
In contrast, in-flight failures of modern turbofan engines are so rare that most pilots will go their entire careers without ever encountering one. Even in the 1950s, jets were already more reliable than piston engines, which was one of the reasons they quickly seized centre stage for long-distance operations. For low-altitude short-haul flights, where jets are inefficient compared to propellers, airliners still switched away from piston engines, moving to turboprops en masse despite piston engines having better fuel efficiency than turboprops. All of this is despite turbine engines placing far greater thermal and mechanical stresses on their components than any piston engine.
Nowadays, piston engines are generally used only on very small general-aviation airplanes... and are no less reliable than the turboprops and jets on larger aircraft.
What is it about piston engines that makes them so unreliable on large aircraft, yet extremely reliable on small aircraft?