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.

Apps are divided into sections called methods. An instruction in one method can direct the device to execute the instructions in a second method. When this happens, we say that the first method has called the second method. After the second method has been completely executed, the device resumes the execution of the instructions in the first method at the point where it left off. When this happens, we say that the second method has returned to a certain point the first method.

It is possible for the first method to call a second method, which then calls a third method. (In fact, the method calls can go much deeper than this.) When this happens, the device must remember the point in the second method to which it will return when the third method is finished. It must also remember the point in the first method to which it will return when the second method is finished.

The device remembers these pieces of information by stacking them up into a pile called a stack. As each method is called, the point to which the computer must eventually return is stored on top of the stack, which grows higher and higher. As the device returns from each method, it removes the topmost point from the stack and returns to that destination. At any given moment, the stack contains the trail of all the methods through which the device has passed to get to the method that is currently being executed, and through which it will have to return to get back to the starting point.

A display of the contents of the stack is called a stack trace. It shows what method the device is executing now, and the path along which it got there, which is (in reverse order) its future path back to the starting point. The trace helps us understand what went wrong if the device arrived in the wrong method.