It's called buffering. Here is my layman's explanation.
For any given acid added to water (or something else it can dissolve in), there is a certain degree that the acid can dissolve into hydrogen ions (protons) and the negative ion. Substances that can dissolve well are strong acids. Substances that do not dissolve well are weak acids.
Consider hydrochloric acid. In water, it breaks down into hydrogen ion (H+) and chloride ion (Cl-), and it does so extremely well, so much so that you can get extremely low pH with not so much hydrochloric acid, and pretty much all of the molecules break apart. Hydrochloric acid is, therefore, a strong acid. On the other hand, the chloride ion, Cl-, is the complementary ("conjugate") base for hydrochloric acid, and it is a very weak base, because it does not want to rejoin up with hydrogen.
Consider acetic acid, a.k.a. vinegar. Acetic acid is a weak acid, in that most of the molecules (>99.5%, usually) will not break apart into hydrogen ion (H+) and acetate ion (CH3COO-). Because of this, the acetate ion (CH3COO-) is considered a strong base. If many acetate ions are floating around in water, they will tend to pull any additional hydrogen ions (H+) out of the water and form acetic acid (CH3COOH).
In blood, human blood, anyway, carbonate (CO3 2-) is the ion of choice for buffering. This comes from carbonic acid, H2CO3, which can be formed by dissolving carbon dioxide in water. (Even so, very little of the carbon dioxide joins with water to form carbonic acid.) By keeping carbonate ion in the blood stream, any hydrogen ions that find their way into the blood stream are rapidly vacuumed up by the carbonate ions and find themselves converted into carbonic acid. This is helped by a friendly little enzyme called carbonic anhydrase which makes the operation occur about a billion times faster than it ordinarily would.
Now, the nice thing about using carbonate is that, not only does it scoop up hydrogen ions, but carbonic acid prefers to become carbon dioxide and water (CO2 and H2O) instead of remaning a single molecule (H2CO3) and then breaking back apart into hydrogen ions and carbonate. Because of this, using carbonate as a buffer means that we convert any excess acidity in the blood stream into water and keep it that way by exhaling the CO2.
The trick is keeping enough carbonate in the blood, and I'm afraid I'm at the end of my understanding of the process here. I am told that the body dumps carbonate into the bloodstream during food digestion (hydrogen ions go into the stomach to make stomach acid; carbonate ions go into the bloodstream to help buffer any acidity found there), but I don't think Science even fully understand how this process works (unless my spies have been negligent in their weekly reports...).