It will clean the surface of the parts.
It will be cooling agent of the engine.
It is used to lubricate the parts.
It will form a oil layer to reduce the contact of air to prevent the corrosion.
For cylinder oil, oil will be alkaline to prevent corrosion of cylinder and assist in forming gas seal.