Each transition shown in the following state diagram is caused by either an API call being made by your code or an action being taken by the scheduler. This is a simplified graphical overview of the possible states and transitions, along with a description of each:
Let's look at them one by one.