Google Cardboard Magnets
There are magnetic sensors in the back of some phones that are used to sense docking stations or smart covers that put the phone to sleep (also called sleep sensors). The magnet on the Android Carboard slides within its groove, then automatically slips back into a place because of another magnet on opposite side. Your phone is able to sense the magnet’s movement using its own magnetic sensor, allowing it to act as a ridiculously clever little button.
So the magnet is not actually interacting with your touch screen, its just that
whenever it slides and slips back in its groove the phone detects this and thinks of it as an input event to select the option shown in the app.
By the way the Android Cardboard app came with only 7 experiences. So the number of input options must have been limited.
For example, Earth Flyover was one of the experiences which let you zoom around a city in Google Earth. Slide the “button” to start flying forward, Slide it again to stop.