It varies per game but is mostly focused in injection method more then the programming itself, so i mean i can post some examples off my Blizzard work if you want and explain but i figure you're working on something else so i hope someone writes you a specific tutorial and this at least makes sense. I guess if you understand what Kung Fu is talking about, take that advice, convince him to write you a tutorial so you know how eh?
Personal Note: Kung Fu Penguin! Your avatar is a gecko! Not a penguin! Dewd! How unprofessional of you.