A baffle is a flow blocker. In an oil pan, it is a metal plate welded above the sump area. When a car corners hard or brakes suddenly, the engine oil wants to slosh to the side of the pan. Without a baffle, the oil would slide away from the oil pump pickup tube. The pump would suck in air instead of oil, dropping oil pressure and causing engine wear. Baffles contain small gates or slots that let oil return to the bottom but block it from sliding out.
Fuel tanks use similar baffles. They stop gasoline from sloshing, which prevents fuel pump starvation and reduces the annoying sloshing noise under the back seat. High-performance racing oil pans feature complex trap-door baffles that lock oil around the pickup under high G-forces.