A Head Gasket seals the cylinder head with the engine's cylinder block. As the pistons of the engine move up in the cylinders they compress the fuel and air mixture then a spark occurs causing an explosion which pushes the pistons back down. It is this explosion which gives the power to turn the car wheels. To maximize the power of the explosion no leaks should happen but if the Head Gasket is not working properly some of the explosion can escape reducing power.
The Head Gasket helps to seal the Engine Coolant from the Motor Oil. When it fails then the Motor Oil starts to mix with the Coolant creating a white sludge that no longer performs as Motor Oil. Left long enough and the engine will seize. In some cases the Cylinders of the engine can fill up with Coolant and the engine will no longer go.
The Head Gasket prevents coolant getting into the engine cylinders. When it fails, coolant can get mixed with the gas and air as the engine runs. When the coolant gets mixed with the gas and air, White Smoke comes out of the exhaust. This smoke from the exhaust should not be mistaken for the the water smoke (vapor) that appears when a car just starts up. White smoke all the time the engine is running means the engine is getting a steady supply of water. Engine coolant will seem like it is disappearing as it is being used by the engine.
Most often a Head Gasket fails when the Cylinder Head warps. This means that the cylinder head is no longer flat. If you placed the Cylinder Head on a smooth surface not all of the flat part of the Cylinder Head would be touching it. This can happen due to an engine overheating, the Cylinder Head not being bolted down correctly or a badly manufactured Cylinder Head that warped over time.