how does a cylinder head work