This is an example of balancing feedback (also called negative feedback).
There are two backgrounds - one white the other black. Hold the scratch board up to the screen so that the light sensor is aimed at the Scratch stage. You will see that the sensor value depends on which background is displayed.
The program switches to the dark background when it senses the light background. When it senses the dark background it switches to the light background.
Click the green flag and see what happens.
(now think about how a thermostat works).