Today most MMO’s have anti-cheat systems, but are flawed. Injecting code during gameplay is another option. But anti-cheat systems can detect this method. The easiest way to hack is by modifying memory values in your ram. But, not all values are within your control.
For example, if we try to change health or mana, the values are supplied by the server, so nothing happens. But other values like walk run speeds can only be supplied by the client as this would cause issues with lag, making your character’s movements stutter.
An MMO’s anti-cheat system will first detect if any files have changed or are altered. Then, check default values during gameplay to see if any obvious changes are taking place. Like running speeds being changed from 1.0 to 1000.0.
Reading ram memory is safe. You can make a program that reads these ram values and controls character keys. Modifying ram values is not.
A good starting program would be CheatEngine. While practicing do not show another person as you can be reported, and using a trial account if you can.