When you enter Mystery Gift and go to Receive the Gift, you will be presented with four different options on how to proceed. These are all used in order to retrieve various events and the methods used depends on the location and type of the event.
Get via Wireless
The Get From Wireless is the feature that is predominently used when events are being physically held such as at Pokémon Centers in Japan or at National Championships. When you go to these events, simply go to this feature and wait for the game to connect. This will allow for the Wonder Card to be downloaded.
Get via Internet
Get from Internet is one of the more commonly used features. From time to time, various events will be held online to celebrate various things such as anniversaries or product releases. This feature allows for you to get the event distribution from home.
Get via InfraRed
The third feature in the InfraRed feature. This feature is another which is used at local events, where you have to line up your 3DS's InfaRed port to the port on the distribution device. It's predominantly used in Pokémon Centers in Japan
Get via Code/Password
The final way is another which requires the Internet. Various distributions will be given where you will get a Serial Code. This Serial Code can only be used once and needs to be entered into the form to be received. There are also special Codes which are shared by all players so they can use the same code to receive the Pokémon being distributed.
There is also a fifth method of receiving gifts not listed on Mystery Gift. When using separate software such as the Pokémon Sun & Moon Special Demo Version or Pokémon Bank, when the software is going to send special Pokémon or items to the game, it will do it by automatically adding the Wonder Card to your save file.