To play homebrew on a DS, you need a third-party storage device. There are two types of storage devices, Slot-1 and Slot-2 devices. Slot-1 is a lot easier, because for Slot-2, you need a passme.
(For more info, go to http://tobw.net/dswiki)
If you get a Slot-1 device, you will need a DLDI code for your device, they are at http://dldi.drunkencoders.com/.
Now you can run homebrew code!