A preliminary-magnitude 4.2 earthquake struck just off the coast of Northern California on Monday morning, according to the U.S. Geological Survey.