There are several things that commonly cause this type of problem:
1) The pins inside the 3DS game slot may be dirty. If this is the case then the first thing to try is to insert a game and then take it back out several times in a row (like 10). If that doesn't work then you can use rubbing alcohol and soak a q tip in it, then rub it on the pins of one of your games. After the pins are wet with alcohol insert it and take it out several times. If none of this works then try the next option:
2) If the pins in the game slot are not dirty then you likely have either a bent pin or one that has been pushed down and needs to be pulled back up. The best way to tell if this is the case is to use a good, bright light and shine it into the game slot. While the light is on it you need to take something like a dental pick and insert it into the game slot. You will see a thin metal piece that will move. You need to move this piece up so you can see the actual game slot pins. See if any are bent. You also need to look at them all very carefully to see if any of them are lower than the others. If they are then they need to be bent back up.
You will also want to look to see if there is anything jammed in the game slot. I've seen that several times too.
Both methods (but especially #2) need to be done very carefully. Someone who is good and experienced at this can probably fix it without taking anything apart. Sometimes the bottom case needs to be removed to repair it, and if it's really broken the whole game slot will need to be replaced.
I could repair this for you if you don't feel comfortable doing it.