Within a function, only a limited amount of information is available. Variables declared within the calling function can't be accessed unless they are passed to the called function as arguments. The only other contact a function might have with the outside world is through global variables.
Local variables are declared within a function. These are created anew each time the function is called, and destroyed again on return from the function. Values passed to the function as arguments can be treated just 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 if the function is called again.
Global variables don't die on return from a function. Their value is retained, and is available to any function which accesses them.