Basically, it goes something like this (still an oversimplification, but slightly more specific):
- Computers have no clue what text is. As a result, they don't care about text. For practical intents, computers deal in numbers.
- Thus, to store some text, each symbol/letter in the text needs a "code number" that refers to that letter/symbol. Some of these are "control symbols" that mark the end of a block of text, etc.
- Each game often has its own set of code numbers. This is done for several reasons that I won't get into here, but it's not quite as stupid as it sounds.
So, to change some text in a game, you need to:
1) Find out what the numbering system is.
2) Find the text you want to change.
3) Change the numbers so that they show the text you want.
Changing the length of text, or changing text to another script (writing system), involves more complex changes, because that relies on other information in the game program.