It automatically creates a header file that you can use in other modules (C files) to refer to functions and globals that are declared in this C file. So if you want to call the function in the current C file from another C file, you would need a header file to include in the other C file. This function creates it for you.
The extern keyword means that the definition of this function is external to this module (C file). The compiler can usually resolve functions without the extern keyword, but it is more correct to use extern when you are referencing any externally defined function.