Replacing a fuel filter isn't listed as a regular maintenance item on most vehicles, and in those cases it generally doesn't need attention unless it's diagnosed as the cause of hard starting, loss of power, hesitation or similar issues.
Some manufacturers, though, including Volkswagen, Subaru and Mercedes-Benz, recommend periodic replacement of the fuel filter. VW, for example, says to replace it every 20,000 miles on many current models, and Subaru says it should be done every 60,000 miles. Mercedes used to commonly recommend a new fuel filter every 30,000 miles, but most current models say to do it every 150,000 miles or 15 years.
Whether a fuel filter needs periodic service can also differ by model or engine within the same manufacturer. On most Ford vehicles, the fuel filter isn't mentioned in the maintenance schedule. If you drive a diesel-powered F-250 pickup truck, though, Ford calls for both fuel filters (one on the engine, another on the frame) to be replaced every 15,000 miles. Other manufacturers may have similar recommendations for their diesel engines.
If the fuel filter isn't listed as a maintenance item, it might be that the filter is integrated with the fuel pump inside or on the fuel tank. To replace it, you have to replace the whole setup.
The filter is supposed to catch any sediment or particles that could damage the engine. Sediment can get into a vehicle's fuel tank when you pump gas from the bottom of a storage tank at a gas station, and that can clog the filter or restrict the flow of fuel.