What does a buffer do in chemistry?

A buffer maintain constant the pH.