Each WiFi game requires its own code. The game should generate a specific code for you. However the online mode doesn't require codes to be entered if you want to race random people I don't think. Just friends you want to challenge requires codes.
You will know what I mean if you have played MK.