Hey,
Try adjusting the volume with the headphones disconnected as jchowdown said.
If the iPhone shows (headphones) even though they are disconnected, there may be debris in the headphone jack.
If it does try the tips in this article:
http://support.apple.com/kb/TS1630
If that is not the issue, try resetting the iPhone by holding the Home and Sleep/Wake buttons until you see the Apple logo.
If the issue persists after ruling out debris in the headphone jack and resetting the iPhone, try restoring the iPhone and setting it up as a new phone. This article:
http://docs.info.apple.com/article.html?artnum=305744 will walk you through restoring the iPhone.
-Jason