RetroArch is a frontend for emulators, & more. It can emulate up to SEGA Genesis & SEGA CD on the Old 3DS/2DS, and up to PlayStation 1 on New 3DS/2DS.
Most standalone emulators are better than retroarch in terms of performance, if you would like to see a list of recommended emulators then see the Emulators page.
Move the retroarch & cia folders onto the root of your SD card
Eject the SD card from your computer and put it back into your device
Section II - Installation
Power on your device
Launch FBI from your HOME Menu
Navigate to SD -> retroarch -> cores
Scroll down and press A on the core you want to install, and select Install CIA
Alternatively, if you want to install all the cores you can press <current directory> -> Install all CIAs
Note there are over 80 cores, and as these cores show up as titles on your home screen this is not recommended
Section III - Core Optimization
Navigate to sd:/retroarch/cores/
Select all the uninstalled cores and place them in a new folder at /Retroarch/Cores-Notused/
Leave any installed cores in the cores folder, these are required for "Load Core" functionality
If you want to use any of the uninstalled cores, move them from /Retroarch/Cores-Notused/ to /Retroarch/Cores/ and install them with FBI, or use the "Load Core" option within RetroArch
Section IV - Launching your ROM
Once your core(s) have finished installing, press HOME to enter the HOME Menu.
Tap on your core to unwrap it, then open it.
Wait for it to load, then -> Load Content -> sdmc:/ -> Go to wherever your ROM is located -> Press (A) to select your ROM -> Choose your core
Be patient for your ROM to load, things don't load quickly in RetroArch on 3DS