A Carnot engine is now defined as any reversible engine, which operates between two heat reservoirs. Actually, it is easy to see that the only two reversible operations possible with only two reservoirs are adiabatic expansion or compression and isothermal expansion and compression.
The Carnot theorem says that no engine operating between two reservoirs can have a higher efficiency than a Carnot engine. Its easy to prove this theorem using the second law of thermodynamics. If such an engine existed, we could combine it with a Carnot engine operating in reverse as a refrigerator and use its work output to transfer more heat from the cool reservoir than was coming in. This violates the Clausius statement of the second law, and so such an engine cannot exist. Note that this argument uses the fact that the Carnot engine is reversible and hence can be reversed to form a refrigerator. This can be done only with a reversible(or Carnot) engine.
Note that the same argument also shows that all Carnot engines operating between two temperatures must have the same efficiency. This fact is used to define the thermodynamic temperature scale.