Okay, so originally i wasn't going to answer this thread, but seeing so many people give crappy answers i think i will answer this one.
The fact is that "how to make a hook" is a very generic question. It's like asking "How to make friends". There are many ways to do it, some are efficient and safe then there are some that are harmful and stupid.
I am not going to be giving much source but i will be explaining the main idea of "Hooking".
What is hooking?
Hooking is basically just editing another program's code flow so that it jumps over to your code then jumps back to their code. This can be achieved in so many ways. The most simple way is the jmp hook which is obviously detected by any anti cheat but just to give you an example.
Code:
//game code
.
.
JMP yourfunction // your function does something (hacks/hotkeys) then jumps back to where game execution left off
//Game code continues
.
.
The fundamental steps in most hooks is as follows:
1. You will most likely call VirtualProtect() in order to change the page protections of the address space you are writing to so that it doesn't crash.
2. You can then modify memory most commonly with memcpy, but you can always just use a char or byte variable to point to a certain place in memory and then change it that way
3. Then you use the VirtualProtect() function again in order to set the page protection back to how it was from when you first started and this will come from the dword buffer parameter you set in the first step
Again, this is an extremely brief explanation and it is just to pop some ideas into your heads. If you guys really want to know what a hook is, like some source or you just want to get more in depth google "Mid function hook source code". The uc forums have a lot of nice resources for these kinds of things.