Do you mean Wi-Fi?
If so... First you'll need a DS, and a game that is able to connect to Wi-Fi, and a Router.
Than, somehow try to connect in game, where they'll ask you to save your DS and your game as one set (which means you can only use that DS to go on Wi-Fi for that specific game), and save it.
If there are online features, they'll register and give you a friend code (FC), which is your personal 12 digit identification number. Use it to connect with others through Wi-Fi.
Than there you go...
As for the Pokemon games, you need to go to a Pokemon Center, and take the escalator downstairs. Speak to the first lady and recieve a Pal Pad.
Do the same method as above, and you'll receive your FC, and you can use your Pal Pad to Register others, so you an battle, trade, whatever.
Sorry for the lengthy answer, and I hope this helps! ~