If I receive a phone call (the ringer works) I can only hear the caller if it's on speaker. Also if I play a song (music or YouTube) it doesn't play out loud, but I see the little equalizer thinkers going.
Read more: https://iphoneus.org/faq/why-does-my-iphone-only-work-on-speaker-but-not-regular.html