Buffer solutions resist change in pH. A solution of an acid and its conjugate base will act as a buffer; the capacity of the buffer will depend on how much of the acid and the conjugate base are present. A good buffer solution will have roughly equal concentrations of both conjugate acid and conjugate base, in which case its pH will be roughly equal to the pKa or the negative log of the dissociation constant for the acid.
Vinegar is a solution of a weak acid called acetic acid, CH3COOH; its conjugate base is the acetate ion, CH3COO-. Since sodium acetate dissociates in water to yield acetate ions and sodium ions, adding sodium acetate to an acetic acid solution is one way to prepare an acetic acid buffer. Once the solution has equal concentrations of acetic acid and acetate, the pH will be equal to the pKa of acetic acid, which is 4.76, so acetic acid buffer solutions are best if the desired pH is around 4.76. Adding sodium hydroxide to a strong solution of acetic acid is another way to make an acetic acid buffer, since the sodium hydroxide will react with the acetic acid to form dissolved sodium acetate.
Citric acid is best known as the compound that lends lemons and other citrus fruits their characteristic sour flavor. Like acetic acid, it's a weak acid; unlike acetic acid, however, citric acid is polyprotic, meaning that each molecule can donate more than one hydrogen ion to the water in which it's dissolved. A buffer solution of citric acid can be prepared by adding trisodium citrate, a salt of citric acid, to the solution. Citric acid buffers are best if the desired pH is in the 3 to 6.2 range.
Hydrochloric acid is a strong acid, meaning that almost all of the hydrochloric acid molecules dissolved in a given solution will lose their hydrogen molecules to the water. In general, the stronger the acid, the weaker its conjugate base -- so the chloride ion is an extremely weak base and its ability to accept hydrogen ions from water is negligible for all practical intents and purposes. Nonetheless, hydrochloric acid can act as a buffer, since adding a base to a solution of hydrochloric acid will not change the pH very much. A solution of hydrochloric acid and potassium chloride may be a good choice for a buffer solution if the desired pH is between 1 and 2.2.