If you aren’t getting any sounds from your iPhone, the first and most obvious place to check is to make sure your volume didn’t accidentally get turned down or set to mute. The best way to do this is to open a song or play some other sound and turn the volume up to see if you can start to hear the sounds. This will allow you to see the on screen volume display to make sure it’s turned up, if your iPhone thinks you have headphones or Bluetooth. It will also tell you if your iPhone software is up to date or if you need to update it.

If the volume display says “headphones”, but you don’t have headphones plugged in, then you will know that the sound is going through your headphone jack and not your speaker. To correct this, plug in headphones for just a minute, and then disconnect them. Play another sound, press the volume and see if you are getting sound back to your speaker of if your iPhone thinks it is still set to “headphones”. If so, restart your iPhone and try again to see if your iPhone recognizes that you don’t have headphones in. If your iPhone thinks that Bluetooth is activated, turn your iPhone off or turn Bluetooth off on your iPhone by tapping Settings, General, Bluetooth and “Set Bluetooth to Off”.

If your iPhone is not set to “headphones” or Bluetooth, then check to make sure that the ringer switch on the side of the iPhone is not set to silent or vibrate mode. If you are sure that it’s set to make noises, try changing your ringtone to a default iPhones ringtone to see if any of those will play.

If you are still getting no sounds, connect your iPhone to iTunes and restore the iPhone to its original settings. If that doesn’t fix the sound, then it could be that your iPhone has a hardware problem. For this you might have to contact Apple and if your iPhone is under warranty that issue should be corrected without any charges.

Source Apple Support