You may have a malfunctioning headphone jack. You can try plugging and unplugging the headsets a few times. However, if the headset jack is stuck so that it thinks there's always a headset plugged in, you'll need to have it repaired. Make an appointment at the Genius Bar at your local Apple Store. Or, contact Apple Support using the Contact Support link at the top right of every page in these forums.
Question: i cant hear anything unless i have my headphones connected to my iphone