Sounds like either the game you put into the game slot was really dirty or it messed up the pins on the slot. First things first, let's inspect your game slot to see if all the pins are there. What you'll need (if you don't have the tools available to open it up):
- A toothpick
- A flashlight/torch
1) Take the toothpick and insert it into the game slot and lift the shield in there. Once it's up, inspect the pins with your flashlight to ensure that there are no gaps and all pins are accounted for (I don't recall how many there should be but any missing ones will be apparent). If the pins appear to all be there then you'll want to get a cotton swab and rubbing alcohol and clean off those pins. Use the toothpick to keep the shield up and rub off the pins. After cleaning each pin, your cotton swab should be dirty. After that, you can test out the game slot to see if that's fixed the problem. If it hasn't, move on the next suggestion.
2) If it appears you're missing pins, you're gonna need a '00' phillips/crosshead screwdriver bit to open up the system to get at the game slot. When you have that, follow this guide to get at the game slot:
Nintendo 3DS Wi-Fi Board Replacement
From there, you'll see an opening in the game slot that you can use a fine point tweezer to pull any pins up that have been pushed down. Once the pins are all up, put the system back together and test your game slot again. If that hasn't helped or the pins are completely gone you're going to need your soldering set and a new game slot to replace it.
3) Replacing the game slot isn't the worst job in the world and there is a video by RetroGameTech that covers replacing a 3DS game slot. Watch that video and you should get a really good idea of how to replace the game slot. If you have to take this 3rd option, be very patient, take all the time you need and don't rush. Rushing may cause more damage than you first realise.
Good luck and I hope this info helps!