Lol well in a nutshell, a hook is a way for a function you write to 'intercept' a windows message/event that happens and process it before it gets to the window it's trying to get to. This way your hook callback function, which gets called by windows, can then process the command and do something with it, and in some cases even prevent the original target window from receiving it, or change the message before it reaches the target window.
For instance a Keypress normally works like this:
User presses Key-->OS Reacts--->Sends KeyPress Event-->Active Window-->Application processes keypress and does what it needs to.
If you 'register' a hook (by calling setwindowshookex) which basically tells windows "hey when this or that happens, call my function first", you get something like this:
User does KeyPress->OS-->Sends KeyPress Event--->HOOK CALLBACK gets called->You do whatever you want with it, for instance save to a file-->Message continues on to Active Window as if nothing happened etc.
That's the basics of a keylogger right there
Same thing with D3D hacks etc. they intercept the drawing events and change a few things around to give the user an advantage