Add 1.0 mL of 1.0 M hydrochloric acid to 100 mL of pure water and the pH crashes from 7 to about 2. Add the same acid to 100 mL of a buffer made of 0.10 M acetic acid and 0.10 M sodium acetate and the pH barely moves, from 4.74 to about 4.65. The acetate ions in the buffer grab the added protons: CH3COO−+H+→CH3COOH. The H+ you added does not stay free; it is turned into a weak acid that hardly ionizes.
Added base is handled by the other partner: hydroxide ions react with the acetic acid, CH3COOH+OH−→CH3COO−+H2O. So a buffer needs both a weak acid to absorb base and its conjugate base to absorb acid. The pH it holds is set by the acid's pKa and the ratio of the two: pH=pKa+log[HA][A−]. With equal amounts the log term is zero and the pH equals the pKa, 4.74 for acetic acid.
A solution of acetic acid alone is not a buffer against added acid: it contains almost no acetate, so extra H+ has nothing to react with and the pH falls. A real buffer has limits too. It works best within about one pH unit of its pKa, and its capacity runs out once the added acid or base exceeds the partner that absorbs it. Past that point the pH jumps as if the buffer were not there.
Think of it like this. A buffer is like a car's shock absorber for pH: bumps from added acid or base get soaked up, so the ride stays smooth. Like a shock absorber, it handles bumps, not a crash; pour in more acid than it has base to absorb and the pH drops hard. Unlike a shock absorber, a buffer can be topped up by adding more of its acid-base pair.
Core idea. A buffer holds a weak acid and its conjugate base together, so each can neutralize what is added: the base partner takes up added H+ and the acid partner takes up added OH−. The pH stays near the acid's pKa until one partner is used up.