The static keyword enusres that a variable defined at toplevel is only visilbe in it's current c-file. Whereas normal variables can be accesed from other files using the extern keyword. The same applies for functions that are marked static.
When used in functions the static keyword just ensures that the value of the variable will be retained across calls of the function.