Engine braking
Engine braking occurs when the retarding forces within an engine are used to slow a vehicle down, as opposed to using additional external braking mechanisms such as friction brakes or magnetic brakes.
The term is often confused with several other types of braking, most notably compression-release braking or "jake braking" which uses a different mechanism. The term only applies to petrol engines and other throttled engines (as opposed to diesel engines, electric motors, etc.)
Additionally traffic regulations in a large number of countries require lorries to always drive with an engaged gear, which in turn provides a certain amount of engine braking (viscous losses to the engine oil and air pumped through the engine and friction losses to the cylinder walls and bearings) when no accelerator pedal is applied.
Petrol (gasoline) engines
The term 'engine braking' refers to the braking effect caused by the closed-throttle partial-vacuum in petrol (gasoline) engines when the accelerator pedal is released. While some of the braking force is due to friction in the drive train, this is negligible compared to the effect from the vacuum.