The headset included with iPhone features a microphone and an integrated button that allows you to answer and end calls easily, and control audio and video playback. The headset included with iPhone 3GS (shown here) also has volume buttons.

Plug in the headset to listen to music or make a phone call. Callers hear you through the built-in microphone. Press the center button to control music playback and answer or end calls, even when iPhone is locked. (You can also use the equivalent button on your Bluetooth headset to control these functions.)
Press the center button once. Press again to resume playback.
Press the center button twice quickly.
Press the center button three times quickly.
Press the center button twice quickly and hold.
Press the center button three-times quickly and hold.
Press the + or – button.
Press the center button once.
Press the center button once.
Press and hold the center button for about two seconds, then let go. Two low beeps confirm you declined the call.
Press the center button once. Press again to switch back to the first call.
Press and hold the center button for about two seconds, then let go. Two low beeps confirm you ended the first call.
Press and hold the center button. See Voice Control.
If you get a call while the headset is plugged in, you can hear the ringtone through both the iPhone speaker and the headset.