A buffer solution is a water-based solution with a stable pH. It is made by mixing a large volume of a weak acid or weak base with its conjugate base or acid. When you add small quantities of an acid or alkali (base) to it, its pH does not change significantly. In other words, the buffer solution stops the acid and base from neutralizing each other.
Through leaching. B horizons or subsoil get materials from above through accumulated rain water that leached these materials and precipitated it into the B horizon.