You need a Router not a Modem to use this cloning method.
First you need to go to Jubilife City. After go west from the Pokémon Center and you will see a alley of some sort. Walk left and you will see a building, then go in the building which should contain a Globe to the top left in the building.
You will be asked if you want to connect to Nintendo-Wifi and you click "Yes". When your on you will have 3 options: Deposit Pokémon, Seek Pokémon, or Exit. Choose "Deposit Pokémon". When you Deposit the Pokémon (The Pokémon you want to clone) You will have to seek something in return. This is a fast way of cloning, but if someone else sees your Pokémon they can grab it in a easy second, so you want to seek a Pokémon nobody wants, has, or that is impossible to get. Here's a suggestion: Seek for a Lv. 1 Arceus.
After you deposited the Pokémon you want to clone, you will see a loading screen. The screen message will say: "Checking GTS's Status". If you look to the bottom right corner you will see a tiny clock meaning the game is loading.
What you have to do to successfully clone your Pokémon is shut the power of your DS off 1 turn before the clock finishes loading. After 8 spins or I'd say 7 and 3/4 turn the DS off immediately. You will probably fail a few times, but when it does work you will be relieved.
Turn your DS back on. Start your Pokémon game and usually you'll probably get that annoying little blue screen saying your last file didn't save loading from previous sav. When you turn the game on you should still have the clones Pokémon in your party. If you don't have them in your party you failed! If you do go on the GTS and check the summary of the deposited Pokémon. If you did this right you'll have the Pokémon in the GTS and in your party. I also suggest using the Pokémon Application that shows your party Pokémon to save time instead of opening the Menu Screen.
Well that's all good luck to you and your cloning!