san francisco sits astride the san andreas fault , a crack in the earth where the pacific plate is slowly sliding north compared with the rest of california , which rests on the north american plate .