Because driving, biking, blading, skateboarding or other device-driven means of transportation are prohibited on Shabbat, we walk rather than commute to synagogue. However, even walking on Shabbat has its limits.

Jewish law sets the maximum walking range from one’s city to 2,000 cubits (3,049.5 feet, 0.596 miles (960 meters). [However, this measurement starts 70 2/3 cubits (112.24 ft.) from the city limits.] Practically speaking, this means that you may not walk a straight line more than .598 miles (3161.74 ft.) in any direction in the wilds outside your city limits.

"City limits" are not defined by the map you carry in your glove compartment.

According to halachah, unless there is more than 70 2/3 cubits between one house and the next, all contiguous housing is considered to be part of the same city. Therefore at times it would be permitted to walk even from one city to the next, as long as the whole way is populated. This can be complex, and a rabbi should be consulted before planning a long trek on Shabbat.