The oil filter on a 2004 Mazda 6 is located beneath the engine, just to the rear of the oil pan. It is a cylindrical-shaped part with a black cap. To access it, you will need to crawl underneath the vehicle and use a wrench to loosen the cap. Be sure to have a pan or bucket beneath the filter to catch any oil that spills out.