To capture a screen shot hold down the home button and press the top button. The screen will flash indicating that a screen shot is captured and the resulting image is placed in your photos folder.
This is a very useful feature for bloggers as they had to use digital cameras to capture screen shots.
The built in screen capturing capability is available in only iPhone 3G models. If you are having a old iPhone and willing to upgrade it iPhone 3G read the section “Upgrade your old iPhone to firmware version 2.0” in the post 5 Steps to Upgrade From a Hacked iPhone to an iPhone 3G by Matt Cutts.