What would happen if the earth was hit by an asteroid?

Depends on the size, speed, and composition of the asteroid. It could burn up in our atmosphere. It could hit the ground harmlessly as a small grain of sand. It could explode in the lower atmosphere and level thousands of square miles of forest. It could hit the ocean and cause a massive tsunami. It could leave an impact crater the size of Texas and throw enough debris into the atmosphere to start a very long "nuclear winter". It could split the earth in two.