If you bought this used, then maybe you need some repairs done. You would need to change the earpiece speaker and microphone (which i believe is in the charging port). If it wasn't used then it may be a software issue. You may either not have a strong signal through your carrier or you may need to try restoring your phone. Try holding down the home button and the power button at the same time for about 10 seconds until it restarts. If its your carrier, which I have seen before, try switching your sim card. I have had many customers come in with the issue being their carrier. If all of that fails, take it to apple. If this is a new device within the 1 year warranty then they will swap it free of charge. If its used, I would still take it to apple and see what the cost for a repair is or go to your closest carrier location and see if they can get you a replacement, but be warned, the replacements from most carriers are just refurbished phones. I have seen a lot of customers get a replacement sent to them...
If it is an issue with the motherboard, then you would have to be able to solder on the board which is very difficult. If you tried other screens then it is most likely something with the board. Check the digitizer and LCD prong connectors on the board and see if they are bent, if they are bent, then that is your issue and you would have to be able to solder a new connector onto the board, which again, is very difficult. You can purchase the connector from mengtor.com, which is were i purchase most of my parts for my repair shop. If you can get your hands on an OEM screen if you don't already have one , take some isopropyl alcohol and wipe the inside off the phone VERY lightly, i would recommend 99% purity so that you don't damage anything. All you are trying to do is remove your fingerprints. Do not wipe the battery because you will smear the letters and make it obvious that you were in the phone. Just wipe your fingerprints, they are usually on the metal only. So like the metal panels on the screen and...
I have had the same issue with an IPhone 5 a while ago. I tried replacing the back camera and everything ad it still didn't work. Sometimes removing the battery and plugging it back in would work, but not all the time. I am not 100% sure with what the issue is but its got to be something wrong with the board or something being shorted. I have never had this issue with the Iphone 6, but I saw it a lot with the iphone 5's. I have had a few go bad after i repaired them, but very few, although i didn't touch the camera. I have also had a bunch come in with bad cameras that even when i changed them, they still didn't work.
There is always a way to fix things. Follow this link to another person who asked the same question, you may find it within these answers hopefully. My Keurig makes brewing noises but doesn't brew.