A magnitude 6.4 earthquake hit Taiwan on Saturday near the city of Tainan, according to the U.S. Geological Survey.