Engine need lubrication to reduce friction between piston and cylinder, also friction on crankshaft and connecting rod to reduce the wear on the engine components. Engine oil need to be replace over time because after certain time the characteristic of the oil will change and the oil also will mix with carbon from the combustion. That is why the oil turn black.