To get a friend code in Animal Crossing, connect to Wi-Fi and follow the in-game steps. Talk to Cooper at the gate, choose the friend code option, and register. You may need to adjust your Wi-Fi settings or use a USB connector depending on your setup.