It's made up of a few variables that identify your Wii:
- Hollywood ID (chip in the Wii)
- Counter (increments every time you format your Wii, can range from 0-31)
- Hardware Model (RVL, RVT for dev hardware...)
- Area Code (Region - USA, EUR, JPN...)
These variables are then scrambled using a ton of complicated bitwise operations.
RiiConnect24 has source code to encode and decode a Wii Number. It has been ported to C, Golang, and Python.