I've answered this plenty of times.
Go to (wow, I seem to repeat myself every 5 minutes)
http://handheldsources.com/M3DS/Download_M3DSR.html and download the system files for your region. Unzip the file (I like 7-zip, if you don't have it already, do youself a favour
http://www.7-zip.org/), and go down until you find the SYSTEM folder.
In another window, open My Computer with your memory card inserted. Right click on the card and click Format... ***(WARNING: THIS WILL DELETE ALL FILES CURRENTLY ON YOUR CARD)***. Change the settings to FAT32, and click format.
Now, open up your card, and drag the SYSTEM folder straight onto it.
Create two new folders, called NDS and GBA. (You need the gba expansion to use any files in the GBA folder). Put .nds files such as homebrew and games in the NDS folder. Also, I recommend creating the folders Music (plain mp3s, not itunes or otherwise protected), Video (dpg), Ebooks (txt format) etc. for the media-extend software. To convert video, download Super (http://www.erightsoft.com/S6Kg1.html).
Now for some arbitary other things that your M3 needs to work properly. Go back to the HandheldSources website, and download the Media-Extend font. Unrar it (you need 7-zip this time) and copy the files across to the FONT folder inside SYSTEM. Download PDADS and unzip it; copy the PDADS folder straight onto your card. Finally, you want the cheat database. Download it, unzip and copy the cheats.db across to your SYSTEM folder.
One thing you should get, though: DSOrganize. If a file does not work from the M3 file browser, it might well work with DSOrganize. It also doubles up as a file manager, notepad, web browser, irc client, personal organiser, music player etc.
I paraphrase a previous answer of mine :-).