I know that soil is used to filter septic systems within our treatment system, however what happens to this soil that is used in filtration, I know it would be changed every once in a while but what really happens when acidic and basic waste flows through this soil?
Like many things in Earth Science, the answer is, "It depends."
In this case it depends on the composition of the soil and the contaminant you are talking about. Climate, particularly the amount of precipitation, can also have an effect.
Septic systems are primarily designed to promote aerobic conditions and aerobic bacteria to degrade organic compounds and pathogens. In a well designed and maintained system, that will be effective for a long time. One of the important considerations is to be sure the soil will allow enough infiltration that it doesn't become waterlogged. Some places need a sand mound because the natural soil isn't suitable.
Some contaminants aren't treated by the septic system. Some are transported down in the infiltrating water with little or no interaction with the soil. These can quite easily contaminate the groundwater if concentrations are too high. Salt, (NaCl), for example, is transported with practically no retardation. Many positively charged cations with charges of 2+ or more will be adsorbed onto the surface of (mainly) clay minerals or in between layers in the clay crystals. They do that because the surface favours them more than the cations that are already present so the new cations replace the old. But the minerals only have a finite ability to exchange the new ions for old. With time the new ions will flow deeper into the unsaturated soils (the vadose zone) until they breakthrough to the groundwater. How fast this happens depends on the soil properties, the concentration and properties of ions in the waste, and the amount of infiltration.
Negatively charged anions are interesting. They are generally poorly adsorbed by mineral surfaces so they are quite mobile in the subsurface compared to cations. Compounds of oxygen and other elements can form important anions like nitrate (NO3-) and sulfate (SO42-). My favourite is pertechnetate (TcO4-), which makes this man-made radioactive element quite mobile under oxidizing conditions. Since many elements have several valence states, changing the oxidation-reduction conditions can change their mobility.
You mention acidic and basic wastes. These can do several things. First, they can exchange for adsorbed ions on the sediments and compete with others ions, increasing the mobility of the others, Secondly, they can affect the chemical form of the ions in solution. Thirdly, they can react with the minerals and alter them to ones with different properties. Finally, they can affect the microbiology in the sediments and change the ability to degrade contaminants.
It is important to inspect and maintain household septic systems by pumping out the tank and checking the leach field for problems. Some places require that you define the location for a replacement leach field before building in case it is needed. Be careful not to put contaminants down your system - especially things like pesticides and herbicides.