You need to unlock Mystery Gift first. You can see how to do that
here.
After that, save and restart the game. Mystery Gift will be an option on the main menu. Select it. It'll give you three options--Check Card and Receive Gift. Go to Receive Gift. It'll give you three options from there: Get Gift from Friend, Via Wireless, and Via Wi-Fi. Select Wi-Fi. After that, it'll ask you if it can connect to the Internet. Let it, and it should find the event on its own. It'll download the Wonder Card for the Mystery Gift, and it'll save when it finishes and kick you back to the title screen. Start your game up as you normally would, and then go to any Poke Mart with an empty spot in your party. There will be a deliveryman in green standing next to the counter. Talk to him, and he'll give you the Pichu.