Well, first you need to learn C++ and basic coding.
After that you normally reverse engine the game to get the offsets and stuff.
That hole thing is hard to understand but once you understand you will see big progress.
I personally like this Youtuber and watch him pretty long already.
Search on Youtube for anything like this. (C++ Tutorial, C++ Gamehacking, you'll get it)
Edit: nowadays its pretty easy once you got into it because there are many forums that im not allowed to name but who focus just on that and they share pretty much everything, from offsets to nearly finished cheats you only need to finish and add your own twist to it. Like changing the hook and stuff.