When enabled, you can use the variable viewer in the developer console (Shift-D) to find variables in the game. You can use the game console (Shift-O) to edit the variables.
Getting the name right is critical, so I recommend the following. Let's assume that there's a variable named "Fred" In the console, if you type "Fred" and return, it will show the current value of Fred. If you mistype, e.g., 'Fref', you get an error message. If you attempt to change the value of a wrongly named variable you will either edit the wrong variable (if it is defined) or create a new variable with the given value. Either could cause unknown and serious consequences at some point.
When you have the name correct, you can use the up/down arrows to navigate through your entries back to the Fred entry and edit it by appending, e.g., "=5", "+=2","-=3", etc. to modify the value. This way, you are guaranteed to not accidentally edit the wrong variable or create a new variable. For example:
Code:
>Fref
NameError: name 'Fref' is not defined
>Fred
3
>Fred=5
>Fred
5
>Fred+=2
>Fred
7
>Fred-=3
>Fred
3