IPhone With No Sound Without the Earbuds
If your iPhone isn't producing any sound without the earbuds being plugged in, it could be a very small issue like the volume setting or a more serious problem. Resolving it could be as simple as tweaking some settings or clearing pocket lint out of the headphone jack. Alternatively, it might require a potentially pricey trip to the Apple store.
1 Volume
The iPhone saves separate volume settings for when you're using your earbuds and for when you are not. Consequently, you could have the volume turned up for your iPhone's earbuds but turned way down, or even muted, for the speaker. When the earbuds are plugged in adjusting the volume changes the earbud volume. When the earbuds aren't plugged in adjusting the volume changes the speaker's volume. Before looking into the problem further, try turning up the volume when the earbuds aren't plugged into your device.
2 Stuck Headphone Sensor
The iPhone has a sensor at the bottom of the headphone jack that detects when you have plugged in earbuds. This switches the device into headphone mode, killing the sound to the speakers and sending sound signals only through the headphone jack. Over time pocket lint and other debris can find their way into the jack and get pressed down to the bottom when you repetitively plug in the earbuds. When enough debris gets packed down tightly enough, it can keep the headphone sensor engaged even after you pull out the earbud jack.
3 Cleaning Headphone Jack
If the headphone sensor is stuck, the iPhone won't make a peep out of the speakers until you clear the compacted debris out of the jack. You can try to blow out the jam with a can of compressed air. Another option is to wrap a paper clip or tooth pick with tape, sticky side out, and then gently work the debris out. Be careful not to work the jack too hard or you might not get sound through your earbuds either.
4 Broken Hardware
If you haven't accidentally muted your speaker volume and your headphone jack is clean, your speaker could just be broken. This can be a predicable consequence of accidental drops that may not have left other physical damage. You would need to bring your iPhone into an Apple Store or a qualified technician to diagnose and repair any broken sound components.