Firsty, U get a buffer solution using a weak acid and its salt of a strong base( not the base itself). Lets suppose u use
CH3COOH (weak acid) & CH3COONa (its salt of a strong base).
Ethanoic acid is a weak acid, and the position of this equilibrium will be well to the left:
Adding sodium ethanoate to this adds lots of extra ethanoate ions. According to Le Chatelier's Principle, that will tip the position of the equilibrium even further to the left.
The solution will therefore contain these important things:
lots of un-ionised ethanoic acid;
lots of ethanoate ions from the sodium ethanoate;
enough hydrogen ions to make the solution acidic.
Other things (like water and sodium ions) which are present aren't important to the argument.
Adding an acid to this buffer solution
The buffer solution must remove most of the new hydrogen ions otherwise the pH would drop markedly.
Hydrogen ions combine with the ethanoate ions to make ethanoic acid. Although the reaction is reversible, since the ethanoic acid is a weak acid, most of the new hydrogen ions are removed in this way.
Since most of the new hydrogen ions are removed, the pH won't change very much - but because of the equilibria involved, it will fall a little bit.
Adding an alkali to this buffer solution
Alkaline solutions contain hydroxide ions and the buffer solution removes most of these.
This time the situation is a bit more complicated because there are two processes which can remove hydroxide ions.
Removal by reacting with ethanoic acid
The most likely acidic substance which a hydroxide ion is going to collide with is an ethanoic acid molecule. They will react to form ethanoate ions and water.
Because most of the new hydroxide ions are removed, the pH doesn't increase very much.
Removal of the hydroxide ions by reacting with hydrogen ions
Remember that there are some hydrogen ions present from the ionisation of the ethanoic acid.
Hydroxide ions can combine with these to make water. As soon as this happens, the equilibrium tips to replace them. This keeps on happening until most of the hydroxide ions are removed.
Again, because you have equilibria involved, not all of the hydroxide ions are removed - just most of them. The water formed re-ionises to a very small extent to give a few hydrogen ions and hydroxide ions.