To erase data from a DS cartridge, go to the Nintendo/Inis logo screen and try holding the A,B,X,Y,L and R buttons. Make sure that you do not turn the power off until the process finishes!
Once you erase the data, it's gone. There are no recycle bins in your DS. If you're going to sell it, then make sure you erase all the files are restore the default setting. No one can steal or access the data you erase except with great skill and time.