While in space the lump of rock or metal is called a meteoroid
When it hits the atmosphere and becomes a "shooting star" it is called a meteor.
Meteors are brief flashes of light that we see in the sky, caused by the atoms which have been excited in the air from the object's high speed
If it survives the transit through the atmosphere and hits the ground, the bit hitting the ground is called a meteorite.
So in answer to your question - to become a meteorite a meteor must survive ablation by Earth's atmosphere and hit the ground.