Limestone is usually made of the tiny calcite skeletons of microscopic organisms that once lived in shallow seas like today's Bahamas. (more below)
Photo (c) 2008 Andrew Alden licensed to About.com
Limestone dissolves in rainwater more easily than other rocks. Rainwater picks up a small amount of carbon dioxide during its passage through the air, and that turns it into a very weak acid. Calcite is vulnerable to acid. That explains why underground caverns tend to form in limestone country, and why limestone buildings suffer from acid rainfall. In dry regions, limestone is a resistant rock that forms some impressive mountains.
Under pressure, limestone metamorphoses into marble. Under gentler conditions that are still not completely understood, the calcite in limestone is altered to dolomite, changing it to dolomite rock.