I am really curious about how they do to get and manipulate the variables from a running application, as for creating a cheat for example.
Few years ago I used to play tibia. Another example is this side program that prints your global position on map in the game (e.g.: x=9785,y=2330,z=7). In this case, how can it read variables that are read inside Tibia?
Use a debugger. If you want to write your own program to read specific variables, you will likely have to do something similar to what a debugger does.
As you might guess, this is not really a beginner topic.