This is the thermal effect of lightning.
When lightning strikes an object, the extremely high current it carries passes through the object in a very short time.
According to Joule's Law, current passing through a resistor generates heat, with the amount of heat produced being directly proportional to the square of the current, the resistance, and the time.
This means that even with a very short duration, a high current can produce tremendous amounts of heat in an instant.
If lightning strikes a human body, the rapid heating of the surface can cause serious skin burns. The heat generated as the current passes through the interior of the body can damage muscles, blood vessels, nerves, and internal organs, and in severe cases, the tissues and organs under the skin can become carbonized.