Lua is a scripting language. It's not only used for WoW emulation scripting. It can be used outside of this field and applied to do anything. It's not all pUnits and events. The problem with guides that are out there today is that they merely teach you how to script for WoW emulation, and we sometimes miss the finer details that makes us only doing the mechanical process of writing a boss :-\ instead of programming in Lua :).
Programming In Lua guide
(From the Lua official site)
[color=orange]Chapters [color=red]1, 2, 3, 4, 5 are recommended!
They are very sturdy foundations to build your Lua knowledge upon. If you want more of a challenge, try chapters 13, 16, 18-22. But chapters 1-5 are what we need to know what we're doing when we create WoW emulation scripts. :D Feel free to post any questions you might ask yourself as you read the guide.
[color=white]The Standalone Interpreter
[color=orange]You can actually download an 'interpreter' for Lua. An interpreter is a program that will run your Lua scripts for you. However, it will not run any WoW emulation scripts or commands, it will only run raw Lua. It would be handy to have as you read the guide to test out what you learnt or to try out a piece of code quickly.
There is an Online demo interpreter
Or the Lua for Windows/Linux package
Good luck and have fun ;D