It’s not exactly an accident that so few people have a clear idea of what’s inside a lava lamp, as manufacturers are notoriously tight-lipped about their top-secret recipes. Having said that, knowing how lava lamps work has definitely shed some light on what types of ingredients must be in there, and industry professionals have shared a few clues over the years, too.

Just by looking at a lava lamp in action will tell you this much: There are two different substances in there that do not mix.

Bryan Katzel, vice president of product development at the lava lamp company Schylling, told Business Insider that the watery-looking base liquid is mostly a mixture of water, colored dye, and chemicals that prevent the formation of fungus. The other ingredient, which forms the psychedelic, slowly-changing shapes that float around the lamp, is primarily made of wax. In Schylling’s case, it’s paraffin wax, a petroleum-based wax that's commonly found in candles and cosmetic products.

Because the wax and water mixtures have different densities, they don’t mix with each other. But if you’ve ever left an oil-based salad dressing sitting out for a while, you probably know that liquids with different densities typically end up settling in starkly defined layers. Why, then, does the wax in a lava lamp seem to have such a tough time deciding where it wants to be?

This is where what Katzel calls the “lava magic” comes in. Usually, since wax is less dense than water, it would simply sit on top of it. In lava lamps, however, the water-based liquid is mixed with a secret combination of chemicals that give it a similar density to the wax.

When your lamp is turned off, the wax is slightly more dense than the water, and will rest on the bottom of the lamp. When you turn your lamp on, the light bulb at its base will heat the wax, causing it to expand, lose density, and rise through the lamp. By the time it reaches the top, it has cooled, contracted, and begun to fall back down to the bottom, where it will keep repeating the process until you pull the plug.

The secret blend of chemicals needed to achieve the perfect density might be specific to each lava lamp manufacturer, but that’s not to say people haven’t tried to create DIY lava lamps at home. According to Myria.com, some have done it by mixing the wax with dry-cleaning fluid or brake cleaner (perchloroethylene) and mixing the water with pure salt and antifreeze (ethylene glycol).

No matter what’s in there, we can all agree that lava lamps are uniquely mesmerizing. Want to take your viewing experience to the next level? Watch some wild GoPro footage from the inside of a lava lamp here.

Have you got a Big Question you'd like us to answer? If so, let us know by emailing us at bigquestions@mentalfloss.com.