Home Made Lava Lamp: Science Experiment for Kids with Oil and Water
Explanation: Effervescent tablets are technically both acidic and basic. The tablets contain Sodium Bicarbonate (a base) and Citric Acid (an acid) which, when mixed with water, react with each other and produce bubbling carbon dioxide. This creates the bubbles we see within the colored fluid.
When the effervescent tablet reacts with the water to make tiny bubbles of carbon dioxide gas, the bubbles attach themselves to the blobs of colored water and cause them to float to the surface. When the bubbles pop, the colored water blobs being denser than the colored gas blobs sink back to the bottom of the bottle. Now, that’s a burst of color!
Source: https://www.zlifeeducation.com/blog/how-to-make-your-lava-lamp/