On a modern mtb, you have a free hub with a cassette. The ratcheting mechanism is built into the hub. On a flip flop hub like you have, the ratxheting mechanism is built into the removable freewheel. The hub is just a solid chunk of aluminum. You change the entire free wheel to change gears.
Do your self a favor a visit sheldon brown. That should clear most of this up.