The basic function of motor oil is to lubricate the moving components of the engine. Proper lubrication allows all of the different engine parts to move past each other without generating too much friction. If friction were allowed to build up then it would slow down the running of the engine dramatically. It would also generate a lot of heat which could cause a significant amount of damage to vital engine components.
The motor oil works with the antifreeze in the radiator of your car to ensure that the engine does not overheat. By reducing the amount of friction generated by moving parts, the heat is spread out throughout the engine as a whole, rather than being concentrated in one area, which allows it to dissipate into the surrounding air more easily.
The motor oil in your engine also works as a cleaner. It is sticky and so picks up any bits of dust or dirt which find their way into the engine. This is another way in which the oil reduces friction and it does not allow moving engine components to become stuck on small pieces of mud or silt.
The engine has to stay clean in order for it to perform at its maximum efficiency. The motor oil is vital in making this happen. The engine might be able to work to an extent without the engine oil, but it would have to use much more fuel in order to keep the parts moving at the same rate.
The oil creates a slippery surface which allows the parts to move easily which reduces the force needed to fuel them. Without the oil the engine would be easily susceptible to damage caused by small particles of dust or dirt and would overheat much more easily.