A head gasket is a crucial component in an internal combustion engine that is located between the engine block and the cylinder head. Its primary function is to seal the combustion chamber, preventing any leakage of gases or fluids between these two engine components.