One may not board a train or plane on Friday if it will be traveling on Shabbat. This is the case even when the driver or pilot is not Jewish. There are several reasons for this: (1) It violates teĥum Shabbat – it is rabbinically prohibited to leave a populated area on Shabbat and travel for more than 2,000 amot (which is the distance of a mil, the equivalent of about half a mile, or 912 m). If one travels farther than twelve mil, some authorities view it as a transgression of a Torah prohibition (see below, 30:1). Thus one who boards a plane or train for an intercity trip is causing himself to transgress. (2) One will not be able to fulfill the mitzva of oneg Shabbat. Traveling by plane or train is wearying, and generally the seats are very crowded and it is difficult to enjoy Shabbat. (3) The Sages prohibited driving in an animal-drawn wagon that is driven by a non-Jew, out of concern that the Jew would pluck a branch in order to help prod the animal. Even when this concern does not exist, the prohibition stands. (4) Taking such a trip belittles Shabbat; it is very much a weekday activity (uvdin de-ĥol). Ĥatam Sofer, basing himself on Ramban, writes that anyone who does not properly rest on Shabbat and treats Shabbat the same way that he treats a weekday, negates the Torah commandment to rest on Shabbat (6:97; see below, 22:1. Also, see below 30:11 for how the laws of teĥum Shabbat pertain to one whose plane landed or whose boat dropped anchor on Shabbat).
Halakhic principles would seem to dictate that we should rule leniently, in accordance with Ha-ma’or and those who concur, since even according to Radbaz the prohibition to set out on Friday is rabbinic in nature (so states Tosefet Shabbat §105). Moreover, it is not clear that one would violate a Torah prohibition by riding in a train or airplane on Shabbat (see Harĥavot). Thus even according to Radbaz there is room to rule leniently. Nevertheless, it seems that in practice we should be stringent nowadays according to all opinions, even Ha-ma’or, since it is stated in Shibolei Ha-leket (Shabbat §111) that the basis for the Sages’ leniency, according to Ha-ma’or, is necessity, for otherwise it would be very difficult to set sail or travel by caravan. Nowadays, however, every flight and train ride, even to the most far-flung places, can begin and end during the weekdays. Therefore, one has no permission to set out knowing that he will have to desecrate Shabbat. It is also possible that setting sail or traveling were only permitted on rare occasions, as temporary measures. But nowadays, when flights and travel are common, there is no such license (a similar ruling appears in Meshaneh Halakhot 3:37; see Harĥavot).