Gasoline Engines
In internal combustion engines, such as for gasoline engines; the piston sparks up the gas in the cylinders, resulting in a powerful burst pulling the piston back and forth, and making the shaft rotate, around its axis. There are four-stroke and two-stroke engines, a two-stroke engine will consume the fuel and at each revolution, two cycles make one complete revolution, so it’s called a two-cycle, or two-stroke engine, a four-stroke engine gets an impulse every second revolution.
There are particular advantages to each type of engine, and uses. Many motorboats use two-stroke engines, whereas most cars use four-stroke engines.
An engine's horsepower tells you how much push you can get with it. The theoretical horsepower called IHP (indicated horse power) which may be determined mathematically using engine's dimensions, such as length and size of the cylinders, or amount of cylinders, as well as the revolutions per minute.
The brake horse power, BHP, is another relevant number, it gives the HP of the engine, before it has been slowed by the differential, the water pump, the gearbox, the alternator, and other components like the muffled exhaust system, or power steering pump, etc. How close this measure will be to the IHP depends on the mechanical imperfections of the engine. It's commonly 70-90% of the full IHP.
Having a high horse power means a more powerful engine, but this may also lead to lower fuel efficiency and greater fuel consumption. Gasoline engines ignite fuel with a spark plug, contrary to diesel engines, which ignite from the heat created during compression. Nonetheless, gasoline engines are preferred over diesel for passenger vehicles, due to to the higher speed, even though there is less torque.

