A spark plug is a crucial component in gasoline engines, responsible for igniting the air-fuel mixture inside the combustion chamber. It creates a small but powerful electrical spark that starts the combustion process, generating power for the engine.