A meteor burns when it enters the earth atmosphere. This is due to the fact that:
Frictional force produces heat
Friction can produce heat. This can be observed if you rub your palm against each other. Likewise, when a meteorite enters the earth's atmosphere, the air applies a frictional force against the motion of the meteorite. Due to this frictional force, heat is produced and the meteor starts burning.