extern is used to say a named object, variable or function, exists but is defined elsewhere.
You see extern implicitly being used in the way some people are told to structure source code. Below I've added an explit extern, but the code is the same without it.
extern int Fn();
int main(int argc, char* argv[]) { printf("Function value is %d\n", Fn()); }
int Fn() { return 42; }
You could do the same with a variable:
extern int FourtyTwo;
int main(int argc, char* argv[]) { printf("Variable value is %d\n", FourtyTwo); }
int FourtyTwo = 42;
The extern forward declaration is not restricted to one compilation unit, the extern declaration and actual definition can be in different compiles of different source code. So what you often find is header files that are full of extern declarations of functions and occassionally variables. stdlib.h sometimes defines an extern variable called errno that contains the last error code, although a modern compiler will define it as a macro that calls a function.
It is generally a bad thing to have extern varaiables, they can lead to unexpected and hard to debug behaviour when they're updated wrongly. Mostly you'll find them used for things like an object that represents the one and only running instance of the application.