Why is my screen popping out of my iPhone 5? And how can I fix it?
Update: I fixed it! Here is what the old battery looked like:
Nice issue, it was happened just a couple of weeks ago to me.
I solved this issue taking back the iPhone (3 years old, not covered from warranty) to the Apple Store. They replaced my iPhone with a refurbished one in 10 minutes for free. I think this is the best solution.
Otherwise you can try to fix it on your own. The issue here is that the battery is collapsing and expanding, pushing outside your screen from the case. Here is a useful illustrated guide for DIY fix. Here is the replacement kit (part + tools).
I think it should be mentioned that a bulging or swollen battery is a sign of failure and it may be dangerous.
All Li-ion cells expand at high levels of state of charge (SOC) or over-charge, due to slight vaporisation of the electrolyte. (…) This is very noticeable for LiPos, which can visibly inflate due to lack of a hard case to contain their expansion.
LiPo cells are affected by the same problems as other lithium-ion cells. This means that overcharge, over-discharge, over-temperature, short circuit, crush and nail penetration may all result in a catastrophic failure, including the pouch rupturing, the electrolyte leaking, and fire.
I've found a question here on Ask Different referring to similar problems with MacBook batteries (which are basically the same) that explain the possible risks and another one with measures to dispose of a failing battery, after a long rant on Apple.
Sorry, the digitizer is separating from the LCD. If you feel comfortable buy a new digitizer assembly (not the digitizer or LCD alone) and change it out with the iPhone 5 digitizer assembly guide from ifixit.com. Otherwise take it to someone who can change it fit you (be prepared to pay $75-$100+).