May need grown-up help
The shaving cream acts like a cloud. The colored water is like water vapor collecting in the cloud. When the “cloud” gets too heavy, it starts to “rain” down into the jar.
This experiment mimics the water cycle we see around us every day. Heat from the sun makes water from oceans, rivers, and lakes evaporate into the sky. The cooler temperatures in the atmosphere make the water vapor condense into clouds. When the clouds get too heavy, precipitation falls to the ground as rain, snow, or sleet, where it collects again.