A solenoid transfers electical energy and activates some other device.
Solenoid, means a coil of wire. It is generally arranged as an electromagnet, which can pull on a lever and operate a heavy switch.
A solenoid used in cars, is a heavy duty relay. A small current from the starter/ignition switch, causes the solenoid to pull a plunger, which makes switch contacts for heavy duty cables, directly from the battery to the starter motor. The small ignition switch and wiring, cannot take the huge amouts of current to operate the starter motor. So the solenoid acts as a remote switch, which also keeps the heavy cables short and under the hood.
Most modern engines use a pre-engage starter motor. The solenoid is an integral part of the motor. It pulls a lever which engages the pinion gear with the starter ring around the flywheel. At the last part of the movement, heavy duty switch contacts are made, which connect the motor to the battery, via extra thick cables.
Biggest causes of car fires are. Electrical fault. Fuel leakage. Burning out after being stolen (arson)
There could be a bad sylanoid or a bad starter...