Well, you will have to have a debugger.
There are hardware debuggers, that you connect to the nintendo DS.
And there are software debuggers, like those found in Emulators.
Using this, you can, for example, see what adresses in HEX are responding to your action.
Like, when you walk out of a room, adress 0x4773F9 get's really active. (for example)
Then it's most likely that that adress is used in the rom, to move you from room to room.
As a rom hacker you could do 2 things, change the adress you are moving too, so you can modify teleports. Or if this adress comes up with is own problems, modify it, so that it works/doesnt have AP anymore.
This is a very undetailed explenation, but yea, this is how it kinda works as far as I know.
EDIT:
And please, don't make this another HG/SS hack patch thread.