They use private software, with a combination of specific hardware, connected to either a PC or TV.
For a DS, the hardware is called "IS-NITRO-CAPTURE" (a blue box with a DS connected to it), and the software is called "IS-NITRO-EMULATOR", inputs can be either a mouse, or the Nitro's Touch Screen.
For a DSi, the hardware is called "IS-TWL-CAPTURE" (a red box with a DSi connected to it).
For a 3DS, the hardware is called "PARTNER-CTR Debugger/Capture".
All of them are available to developers and specific (big) press media only.
Developers have to pay up to 3000 Euro's to keep it, press borrow them for free, for a limited time.