This function is called by an extension (one of the things hooked into Tcl by load) as the first step of initializing the extension. It's just like a Tcl_PkgRequire of the Tcl library itself (you were doing that already, yes?) but also makes available the rest of the Tcl library functions within the extension. You then compile the extension library with -DUSE_TCL_STUBS set and link against libtclstub.a (which probably has a version number too, and might have a different suffix, e.g., .lib on Windows).
The arguments are:
The result is either TCL_OK (in which case you can keep on doing the rest of your initialization) or TCL_ERROR (something went wrong, probably a version mismatch). If you get an error, the only safe thing to do is to immediately return TCL_ERROR from the initialization function; no other Tcl API function may be used.