How a dirt bike engine works depends on whether it’s a two stroke cycle engine vs a four stroke cycle engine. For example, one stroke in two produces power on a two stroke; whereas one stroke in four produces power in a four stroke. But the basic components of both engine types are similar, as they are both internal combustion engines. They both have pistons, cylinder block and head, fuel inlets and exhaust outlets (although these operate differently) and a crankshaft. The lateral movement or up and down motion of the piston is converted into a rotary movement in the crankshaft in both engines.