In order to remove a buildup of solid waste, or sludge, you must pump out a septic tank to remove that which accumulates at the tank bottom. This includes grease that tends to manifest as scum which floats at the top.
Both this sludge and grease can utterly contaminate the leaching field where, ordinarily, well-treated waste water is normally deposited. How often you pump out the tank is generally dependent upon various factors, such as the septic tank’s size, how large your household, and the proportion of the wastewater that is comprised of solid waste.
For example, a tank with a 1,500 gallon capacity that serves a typical household of four with an ordinary amount of output. In this case, you should pump out the tank every 4 or so years. If only one individual is using a 1,500 gallon tank, then 20 years should suffice.
The number of people releasing wastewater down drains also makes a large difference. Keep in mind that if there is a family of four and the septic tank is significantly smaller, say around 900 gallons, then it is important to pump it out far more frequently, maybe every 2 years.