Refractive Indexes and Invisibility (A real-life magic trick)
When light refracts from two different substances with the same index of refraction, the materials cannot be distinguished from one another. Here, Pyrex and vegetable oil have the same index of refraction so that the test tube appears invisible in vegetable oil. The light isn’t bouncing off off of the pyrex tube, just travelling straight through.
However, water and pyrex have a very different refractive index. The light travelling through the water refracts off the pyrex and reflects back in to your eye, so it does not appear invisible.
When you see the pyrex test tube under the oil, you are actually just viewing the air inside it before it becomes filled as the pyrex itself is invisible.