your question requires knowledge of what engine you are using, or programming/syntax being used in a given program or game...
however for pure programming in C++:
use proper syntax - if statements and call function once certain conditions are met...
using hooks its different, because it is calling outside of the current file/program for functions...
if health is < 100, get current;
then print echo health to UI element health;
end if;
or often something similar for C++
C# or C Sharp is different using less syntax to create calls
call.function health
current write element
or something similar, i am much less familiar with C# so this might not be accurate...
hooks are like a switchboard, first it gets the attention of the program and tells it were it needs to look for overrides...
if i understand hooks properly...
the best way to learn C# is to use microsoft free programming tools and looking at written code and examples...
there are also a ton of books and other materials you can barrow from libraries as well as information online, you can find some stuff using google search.
this also helps if you plan to call .dll libraries that already exist within the OS environment, then of course there is usage that you need to understand to use outside addons for engines such as nvidia and radeon functionality...
for specifics you really do need the books AND the programs involved that you plan on using.
also, unlike my examples you need to pay close to attention to spelling and keep spelling constant for non-function stuff you have created to be called.