A computer is a machine that follows a list of instructions called a program. An Android device is a computer and an app is a program.
By default, the device will execute the instructions in the order in which they are written in the app. Some instructions, however, will tell the device to skip ahead or go back to an earlier instruction. Furthermore, an event such as a user clicking a button on a screen can cause the device to jump to an entirely different section of the instructions of the app.