HDR stands for High Dynamic Range and it works by capturing three different exposures of the same image and then combining them into a single image. This can be really helpful when your subject includes a large range of lights and darks and you want the details in the darker parts of the photo to be visible without overexposing the lighter sections.
HDR is probably most useful for taking photos of landscapes and lowlit or backlit subjects. Since it takes longer for the iPhone's camera to process an HDR photo, it's best to turn HDR off when taking shots of moving subjects.
You can select the HDR mode your prefer in the top menu bar of your iPhone's Camera app. Choose HDR On or HDR Off if you want to control whether to take a photo in HDR or not, or HDR Auto if you want to let the iPhone's camera determine whether HDR is appropriate.
If you want to be able to compare the differences between your HDR and non-HDR images, go to Settings>Photos & Camera and toggle Keep Normal Photo on before you start taking photos. The HDR and non-HDR versions will both be saved to your cameral roll.
Unfortunately, the iPhone's HDR mode is kind of weak. The HDR image and the normal image below are not only nowhere near as beautiful as the professional photo at the top of this post, you can hardly see the difference between them beyond a slightly lighter hallway:
Hopefully Apple will improve this really useful feature in the future; but in the meantime, if you often find yourself taking pictures that would benefit from using HDR, consider getting an HDR app. True HDR ($1.99), Pro HDR ($1.99), and vividHDR ($1.99) are the three HDR apps that I have seen recommended the most (although only vividHDR has been updated recently.) Feel free to chime in in the comments with your own HDR app recommendations.