Hackers use a device known as a USBGecko to interface the Wii with a PC. Once connected, an application called WiiRD (Wii Remote Debugger) is used to view and modify RAM in real time, and has a few functions to facilitate the control of a game. For example, you can debug the game by forcing a breakpoint which executes when a specific ram location is written to, read from or executed.
The Homebrew Application GeckoOS has a built-in code handler which acts on top of the game's execution. Every processor cycle it reads through the codelist written to the game's memory when it boots, and interprets it to create modifications. Codes are 64 bits long (2 32 bit words) - generally, the first 8 bits are the "codetype", the next 24 bits are the address to execute it at, and the second word explains what to do there.
For example, the code:
045A9320 3F800000 would be read as follows:
04 - means a RAM write from the base address (defaults at 0x80000000)
5A9320 - added to the base address to determine the location of the write
3F800000 - the value to be written to the address.