Besides carbonic acid and water, soda water often contains sodium compounds such as sodium bicarbonate (baking soda), which are slightly alkaline. The alkaline salts counteract the acidity of the carbonated water, and make it taste slightly salty, like the mineral water it was originally made to resemble. It is these sodium salts that give soda its name.
In flavored sodas, sugar or other sweeteners change how the tongue reacts to the acid, in the same way that adding sugar to lemon juice makes lemonade taste far less sour than the lemon. In fact, so much sugar is added that additional acids are needed to add the refreshing hint of tartness we like. This is why many soft drinks (especially colas) add phosphoric acid to the drink. Citric acid is also often added, especially in citrus flavored drinks. Another common additive for tartness is malic acid (the molecule that makes apples tart).
Benzoic acid or sodium benzoate is often added, since it prevents bacteria and molds from being able to ferment sugars and spoil the flavors in the drink.
To maintain the levels of acidity, a buffering agent such as sodium phosphate is sometimes added. This keeps the acidity at a fixed level, so the product tastes the same all the time, even as the carbonic acid levels get low as the carbon dioxide bubbles form and break.
Caffeine is often added as a stimulant drug. Naturally present in cola and other plant derived flavorings (and in coffee and tea), caffeine was one of the main reasons to drink cola drinks when they were first invented.
Caramel color and FD&C colors are also added to many soft drinks, just to make them look more appetizing.