A magnitude 5.0 earthquake hit southern California on Saturday, followed by more than 40 aftershocks.