When is it okay to leave your city on Shabbat, walking, how far, and can you go to another city?

Is it when you are going to a synagogue or the nearest synagogue? If we think in terms of cities? No car and being Orthodox.

I understand that a Rabbi can minister in another city from the one in which he lives. What about taking a plane to Las Vegas? Or going to another city and whether or not it is going to a synagogue? Or, getting a ride somewhere? I know that we are not to buy and sell. Family? No tanks or maybe vehicles? No horse?

Somebody help me here. I do not want a synagogue with idols.

Pleasure to read the Torah where I live this last week, Shabbat, at least.

Electricity is different from going up north.