Local variables are declared within a function. They are created anew each time the function is called, and destroyed on return from the function. Values passed to the function as arguments can also be treated like local variables.
Static variables are slightly different, they don’t die on return from the function. Instead their last value is retained, and it becomes available when the function is called again.
Global variables don’t die on return from a function. Their value is retained, and is available to any other function which accesses them.