Lots of people have been confused about DLDI patching with homebrew DS software, hopefully this should clarify things a bit.
The DLDI (Dynamically Linked Device Interface) was devised because there are so many different cards you can use to run homebrew software on and they all handle the way the software can access the files on the card differently. For a while developers were getting bogged down trying to get their code running on all of them properly, but with DLDI it keeps all this file accessing code seperate, so coders can concentrate on other features of the software. It also means more homebrew in the future is likely to run on your card of choice with few problems. Sounds like good news all round right?
So how do you DLDI patch compatible software?
Go to http://chishm.drunkencoders.com/DLDI/ and you'll see there are different methods for patching your nds files, for Windows users I strongly recommend DLDIRC (Win32 Right Click). If you are using a Mac/Linux you'll need to follow the instructions for them on the site.
Using DLDIRC
Install DLDIRC from the site and when it asks you which card you would like to use, select your card from the list.
Now when you right-click an *.nds file it will offer you the option to DLDI patch it, do so then press a keyboard key when asked and it will patch the homebrew for your card.
It's just the .nds file you need to patch, you don't need to patch individual ROMs if it's an emulator for example. Just copy the patched .nds and any other files it requires to run in the usual way.
Remember: Not all homebrew software needs to be patched and not all homebrew is compatible with the DLDI, read the notes that accompany the software and it should give you a good idea of if you need to patch or not.