Dry ice is frozen carbon dioxide -- that means it's extremely cold. When brought to room temperature, it rapidly sublimes, meaning the solid goes straight from solid to gas as molecules escape its surface. When you drop dry ice in water, it will bubble rapidly as the CO2 sublimes. You can do this in a swimming pool, as long as you don't do it indoors -- but there are several precautions you should observe.
How CO2 Freezes
Molecules in liquids and solids are held together by intermolecular/ionic interactions -- the attraction between positive and negative ions in a salt crystal, for example. The interactions between molecules of carbon dioxide are relatively weak, so they have to be cooled to an extremely low temperature before the CO2 will freeze. That's because temperature is a measure of average energy of motion -- so cooler temperature means the average molecule in the gas is moving more slowly. Once the temperature has been reduced below its freezing point, the molecules of CO2 are moving slowly enough that the weak intermolecular forces they experience can hold them together as a solid.
Dry Ice in Your Pool
The water molecules in your pool are at a much higher temperature than the dry ice, so collisions transfer energy from the water molecules to the dry ice, cooling down the water while heating up the carbon dioxide. As the molecules at the surface of the dry ice move more rapidly, they acquire enough energy to break free of the solid and escape as a gas. The large excess of CO2 produced creates a huge amount of bubbles, which is why dry ice is so popular in classroom demonstrations.
Safety with CO2
Your body needs oxygen. As it sublimes, the dry ice displaces some oxygen, temporarily creating a zone of high CO2 concentration. Consequently, it can act as a simple asphyxiant, i.e. a chemical that displaces oxygen, and potentially become dangerous. Do not place dry ice in an indoor pool. Also note that depending on how much dry ice you add, the air immediately above an outdoor pool will initially have a higher concentration of CO2 than the surrounding air, at least until these high levels dissipate. Do not add large quantities of dry ice in the pool and then go swimming; do not leave large quantities of dry ice in a confined space.
Safety With Cold Objects
Dry ice is extremely cold -- 109 degrees Fahrenheit or below. Consequently, if you try to pick up a block or chip of dry ice with your hand, you can hurt yourself badly -- just as you would if you tried to pick up a hot object. If you're placing dry ice in the pool, DO NOT handle it with your bare hands. It's best to drop it in the pool with gloves and/or tongs, at which point it will start to bubble rapidly. Large quantities of dry ice can create a kind of "fog" just above the surface of the pool. Keep in mind that this "fog" contains a high concentration of CO2, so don't try to stick your head in it -- you need oxygen to breathe.