it works by making the iPhone max out 100% of its power processing capacity. A slider lets you adjust the temperature and illuminate the "heating elements." According to several App Store reviews, it doesn't work so well.
We don't know just how hot it gets, but we imagine there are safeguards to prevent serious overheating. According to the Apple Knowledge Base, the iPhone should be operated "...in a place where the temperature is between 0º and 35º C (32º to 95º F)." Prolonged exposure to extreme heat will produce the temperature warning screen. The app got approved (somehow), so we assume it's safe. But I'm not installing it.
We don't know why you'd want to run your undoubtedly-still-on-contract iPhone at 100% capacity -- buried inside a confined pocket -- for any length of time, but that's up to you. At the very least your battery would drain in no time. At worst, well ... let's not find out. You can get PocketHeat now for $0.99US.
Or just buy gloves.