Water drawn from a well was once precipitation that fell onto Earth's surface. It seeped into the ground and, over time, occupied the porous space in some subsurface material. Big particles that are in surface streams, such as leaf chunks, will not be seen in groundwater. So, yes, big particles are filtered out by the ground, along with some minerals and chemicals that are too small to see.
But groundwater can contain many different elements that are NOT filtered out by the ground and that we don't want in our drinking water. Some are naturally-occurring (like hydrogen sulfide) and some are human-made substances. Groundwater can contain petroleum, organic compounds, or other chemicals introduced by human activities.
Contaminated groundwater can occur if the well is located near land that is used for farming where certain kinds of chemicals are applied to crops, or near a gas station that has a leaking storage tank. Leakage from septic tanks and/or waste-disposal sites can also contaminate groundwater. A septic tank can introduce bacteria to the water. Pesticides and fertilizers that seep into farmed soil can eventually end up in water drawn from a well. Also, a well might have been placed in land that was once used for something like a garbage or chemical dump site. In any case, it is wise to have your well water tested for contaminants.