Students may have witnessed the effects of a chemical reaction when chemicals are mixed: heat is released or absorbed, bubbles form or fizzing occurs, a noise produced, or the colour changes.
During this demo, however, no new chemicals are added to the flask. All you do is shake the liquid in the flask and the colour changes!
Although it doesn't look like you have added any chemicals to cause the reaction, shaking up the bottle does mix the liquid with another substance: Oxygen (air).
The mysterious liquid in the flask contains a chemical — a dye called methylene blue. The methylene blue is reduced (loses oxygen) by the potassium hydroxide and glucose solution and as a result loses its colour.
When you shake the bottle, the oxygen in the air mixes with the solution and re-oxidizes the methylene blue, turning the liquid blue. When the shaking stops and the liquid stands still, the blue colour disappears again as the potassium hydroxide and glucose solution continues to reduce the dye.
Fun Fact
Methylene blue was identified by Paul Ehrlich in 1891 as a successful treatment for malaria. It was replaced by other drugs, because patients disliked its two side effects: turning the urine green, and the sclera (the whites of the eyes) blue. Methylene blue is still used to treat cyanide poisoning and fungal infections in fish.