Animal Crossing is primarily a Nintendo franchise, so the main way to enjoy it online is through the Nintendo Switch title Animal Crossing: New Horizons, which supports online play with friends via a Nintendo Online subscription.
You can buy the game digitally through the Nintendo eShop or pick up a physical copy. While the original GameCube version can't be played online, newer entries offer full online features once your console is connected to the internet.