In most sparkignition engines, a thermodynamic cycle occurs when the piston completes four strokes within the cylinder, and the crankshaft completes two revolutions.
Both Otto cycle(spark ignition) and Diesel cycle engines(compression ignition) engines can be made to run on multiple fuels(petroleum, ethanol, natural gas) The cost is only nominally more than single fuel engines.
Instead of sparking the ignition when the piston is close to top dead center (when the air is compressed), that spark occurs as the piston is pulling away, when the air pressure is at its most turbulent, creating much faster ignition and more power.