Function
Flash cards for the Nintendo DS fit into the slot-1 opening on the Nintendo DS, just like regular DS games. Unlike normal DS cartridges, flash carts have a small slot on top of the cartridge to insert a flash memory card, usually Micro SD or Micro SDHC. With these small memory cards and an adapter, often included with the flash card, you can plug the flash memory card into your computer to transfer all the homebrew apps you've downloaded from the Internet. Once transferred, the memory card inserts into the flash card, which goes in the Nintendo DS. You can now use compatible data stored on the Micro SD card on your Nintendo DS.
Homebrew
"Homebrew" titles are games or applications created by users instead of big-name game developers. Functionality of the apps varies from simple classic-style arcade games to programs like MoonShell, which allows you to play MP3 and video files on your Nintendo DS. Other options include personal organizers, text readers, weather checking apps and Treasures of Gaia, a Google Maps app that brings the powerful world viewer to your Nintendo DS.
Legal Issues
A Nintendo DS ROM file is a computer file of a game, app or program for the Nintendo DS, to be stored on the flash card's Micro SD card. While user-created homebrew ROM files are legal, commercial ROMs -- digital copies of the Nintendo DS games you buy in stores -- are illegal in almost all scenarios. Grey areas arise concerning games you already own. U.S. copyright laws restrict this to using the ROM copies strictly for archival purposes, meaning they're not to be played or distributed. While flash cards, themselves, are legal in most countries, Jonathan Fildes of BBC News reports that a 2010 court ruling makes them illegal in the UK. The best way to avoid legal trouble when using ROMs and a flash card is to simply stay away from pirated, copyrighted material.
Considerations
There are multiple flash card variations available, some for the Nintendo DS, some for the DS Lite and others for the newer Nintendo DSI. Choosing one comes down to determining which card offers the features you want. For example, some offer built-in cheat engines with compatibility for the Action Replay cheating device, while others support larger memory cards or easier to navigate menus. Ensure you purchase your card from a reseller you find through the manufacturer's website to ensure you get a real version. Flash cards often get pirated, themselves, where developers sell cheaper knock-off versions designed to look identical to the originals.