Billions of years ago, the continents of the earth are not the same with the continents that we have now. It started from a huge land mass called Pangaea. Because of the movement of tectonic plates, the huge land masse drifted apart from each other and the continuous movement of these plates resulted to the formation of the continents that we have today.
The fossils are the evidences that the continents were attached from each other and there are the same fossils that are found in the different parts of the world.