It says how it works on the link I just posted. Basically, you have a lua state, which you can communicate with (most of the communication happens through a stack). The Lua C API is actually quite low level so its hard to describe it better than that without going too much into the details.
You make up functions that do stuff in your program. It's easiest to define them as C functions then map those onto Lua functions.
You include the library and tell it to read certain scripts?
No, you define the functions yourself for your own app, but your app links to the Lua runtime.
How are the necessary variables made available?
You write a script in Lua that calls into the app's functions to do stuff. These functions can return values or just do stuff. The app loads the Lua script and runs it.