What is the reason of explosion of batteries?
The most common cause for a battery to explode is the contents of it heating to a point where it exerts a force on the battery too large for it to handle. Basically, if the battery feels very hot, it could be under large pressure and the object that it is powering should be powered off if possible. The recent reports of smartphones catching fire are due to a manufacturing error by Samsung on the Galaxy Note 7. A portion of these phones were not insulated correctly and it caused a short circuit that ended up burning holes through the phones. This was not an explosion, but the phones did catch on fire. In conclusion, you can use your phone while charging if it's not a Galaxy Note 7 (which has been recalled).