In order to backup or restore your 3DS saves from a cartridge or eShop title, you will first need access to CFW or homebrew. CFW is the preferred option, and a comprehensive guide on how to set it up can be found here. If you do not have what you need to install CFW, and your 3DS is on a lower firmware, check Smealum's homebrew website to see if you have a compatible homebrew entrypoint. If you do not have one, you cannot backup or restore your 3DS saves without a Cybergadget, which only works on Japanese retail cartridges and is outside the scope of this guide. Powersaves, the SMS4, and the NDS Backup Adapter Plus will not work because they export the raw save. It must first be decrypted, which can only be done with a hacked 3DS or a Cybergadget.
There are various ways to install CFW on your 3DS. You can watch Youtube videos or other guides. We recommend this guide as it is frequently updated.
Of course, use any of them at your own risk.
If you're using CFW, the recommended tool is Checkpoint. A tutorial on how to set up and install it can be found here:
If you're using Homebrew, or if you simply do not want to use Checkpoint, follow this tutorial to use a tool called JKSM:
Using an Emulator
If you're playing on an emulator instead of a console, getting your save data is far easier and requires no hardware except for a compatible computer. Read here to learn how to get your saves from Citra 3DS: