HDR (iPhone 4 or later) combines three separate exposures into a single “high dynamic range”
photo. For best results, iPhone and the subject should be stationary.
Turn on HDR: Tap Option, then set HDR. When HDR is on, the flash is turned off.
Keep the normal photo in addition to the HDR version: Go to Settings > Photos & Camera.
When you keep both versions, appears in the upper-left corner of the HDR photo when
viewed in your Camera Roll album with the controls visible.
Read page 75 of http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
It automatically deduces which level of exposure would be best for the photo you would be taking.
It doens't decide what the level of exposure is.
It takes three photos at different exposure levels then uses different parts of these separate exposures (photos) and combines them to a single HDR photo.
Explained a bit here -> http://www.macworld.com/article/1153850/hdrontheiphone.html
If you take HDR phot and move the camera around, it'll be crap since it's trying to blend the photos.