The major reasons of a battery burst will be either an highly rare manufacturing problem or a power surge, each of which will trigger a short circuit.
In the situation of a power surge this can be triggered by using a cheaper, or non-official charger for your device. This could then charge the phone too fast, resulting in lithium plates to form which will then cause a short circuit.
Any smartphone from a reputed producer will have in-built technology which helps prevent this, but in very rare cases this can fall short due to heating up, or a production fault.
Some suggestions on how to prevent your phone from overheating:
- Don’t charge your phone below a pillow.
Never leave your phone in direct sunlight. - Be thoughtful of tasks which you know will be very heat intensive: Recording 4K video, installing lots of apps and films, playing graphically intense games on your phone.
- Remember cases are not going to help your phone cool down, be careful of a very large thick case.
- Always use an original charger and plug.