Oil is used in an engine to lubricate its moving parts. As the oil circulates in the engine it picks up rust, metal shavings, and dirt. The oil filter removes this debris from the oil to prevent engine wear caused by these foreign particles, keeping the oil in the engine clean.