Sediment filters physically catch sand, silt, rust flakes and other particles. They're often the first stage in a larger system because they protect downstream filters and equipment from clogging.
Cartridges are labeled with a micron rating; a smaller number catches finer particles but may clog faster. Ask whether the rating is "nominal" or "absolute." The terms mean different things, and the difference matters when you compare cartridges.
A clogged sediment filter often shows up as falling water pressure. How often to change it depends entirely on how much sediment your water carries.
Well owners with gritty water should also read the Well Water Primer, since sediment can signal a well problem rather than a filter problem.