Motor oil lubricates all of the internal moving parts of an engine so that they do not touch each other, causing wear. Many of the parts inside of an engine must fit together and actually touch to work. Oil moves through the engine leaving a thin film behind that creates a barrier between the parts preventing them from tearing each other apart. As time and use happens, oil degrades and becomes less lubricating. If not changed, eventually it becomes useless and it's as if there wasn't any there to begin with. As the oil circulates through the engine, it passes through the oil filter which takes out contaminants like small shavings of metal that are the result of parts touching each other, prolonging the life of the oil and the parts.
A similar system is used inside the transmission, although the lubricant is different. Zero In Racing has gear oil, additives, motor oil, oil filters and more!