I am currently on fire. Can I survive this? [duplicate]
Solution 1:
If you carry a bucket of water around (most vets do) you can use the bucket of water to put yourself out.
You can also brew fire resistance potions once your more established which can severly help the situation.
If you have neither of these things, the most you can do is chuck as many of your items to a safe spot before you die to prevent the lava or fire from destroying them upon your death. Note that fire does not ALWAYS kill you, the damage it does can be found in the question murgatroid linked in the comment under my answer.