The test for carbon dioxide uses an aqueous solution of calcium hydroxide (limewater). When carbon dioxide is shaken with or bubbled through limewater the limewater turns milky (cloudy).
This test is actually a reaction between the carbon dioxide and limewater, to make limestone (calcium carbonate).