Light slows down inside glass or water. Snell's Law — n₁ sin θ₁ = n₂ sin θ₂ — says a beam entering a denser, slower medium bends toward the dashed normal line; entering a thinner one, it bends away. It is why a straw in a glass of water looks snapped in two right at the surface.
Go from dense to rare and steepen the angle: past the critical angle no light can escape — it is all reflected back inside. That is total internal reflection, and it is how fiber-optic internet sends light bouncing down a glass thread for kilometres.
At every boundary a little light reflects and the rest passes through at the same time — only about 4% bounces off window glass straight on, more as the angle steepens.
Newton, 1666: white light isn't one colour. Each wavelength has its own index, so a prism bends violet a touch more than red and fans the beam into a spectrum.
Something in the simulation stopped unexpectedly — the lesson continues without it. Nothing you did was wrong; you can move on.