While the rock is still in space, it is called a meteoroid . Many meteoroids come from comets, which are made mostly of ice and rock. As a comet travels close to the sun some of the ice melts and pieces of rock come loose. These pieces of rock then become meteoroids, traveling through space on their own. Sometimes they come close enough to the earth to get caught by earth's gravity, and become a bright meteor streaking through the sky.
Meteors heat up quickly in the atmosphere because of friction with the air.
Try rubbing your hands together as fast as you can, back and forth. Soon they'll start to feel warm. That's because of the friction between them. So friction with the air heats them until they glow and finally start to burn. Each day as many as 4 billion meteoroids, most very tiny, fall into the earth's atmosphere.