The Shulchan Aruch (110:4) writes that when one travels out of the city he should recite Tefillas Haderech.
It makes no difference whether one is traveling by foot, car, train, airplane or boat. Ishei Yisrael 50:1 quotes Rav Shlomo Zalman saying that one who is traveling by car can add the phrase “VeTatsileynu MeTeunot Derachim” (may we be saved from a car accident). However, Harav Chaim Kanievsky shlit”a is not in favor of adding to the text of the Tefillah.
The poskim discuss when to recite it when flying. According to Harav Shlomo Zalman Auerbach zt”l (Halichos Shlomo page 254) one recites it when the plane is high enough of the ground that if it were to fall it would be dangerous. For all intents and purposes one would recite it immediately after beginning takeoff, when the plane is ascending. According to Harav Yaakov Kamanetzky zt”l (Emes L’Yaakov 110) one recites it when the plane is still on the runway when the engine begins to really rev up and it begins it’s last push before takeoff.
Rav Yaakov Kamanetzky zt”l explained that Tefillas Haderech actually has the status of a tefillah (prayer) and not a bracha. Therefore, if one is able to recite Tefillas Haderech on his own (he is capable and has a siddur), one should not lchatchila have someone else say it for him to be motzei him. This is similar to other tefillos where we do not initially have someone motzei others if they are capable of davening on their own. As opposed to brachos where there is no issue with that. (See Emes L’Yaakov 110 and Shulchan Halevi page 19) If one is unable to say it himself (he is not able to read hebrew, doesn’t have a siddur or is driving), he may have someone else be motzei him.
Another practical halacha that stems from this view of Rav Yaakov is that if one is in doubt as to whether Tefillas Haderech is required, one may recite it (as is the law regarding prayer, as opposed to brachos where we conclude safek brachos l’hakel).
The poskim discuss whether one can say Tefillas Haderech for someone else (to be motzei others) after he has already recited it himself. (See Aishel Avraham Botchetch 110 and Halichos Shlomo ch. 21) For normative halacha, a rabbi should be consulted.
Initially, one should recite Tefillas Haderech while standing. (S.A. 110:4 and Aruch Hashulchan 11) If this is difficult to do, one may recite it while seated. Therefore, if one is on a bus or train and one is able to stand, one should do so.
Although we just mentioned that one should initially recite Tefillas Haderech while standing, if one is driving in a car one is not obligated to pull over and get out of the car in order to recite it while standing as this is considered a tircha. However, if possible one should pull the car over and recite it while seated. Yet, if this is difficult to do, one may recite Tefillas Haderech while the car is in motion. (Ishei Yisroel page 608)
One only recites Tefillas Haderech once per day. Meaning, Tefillas Haderech covers the entire days’ travels. This is true even if one rested for a few hours during the day. Therefore, if one travels from Tel Aviv to Yerushalayim during the day with the intention of returning back to Tel Aviv at night, one only recites Tefillas Haderech once. (Kuntres Tefillas Haderech R’ Sroya D’Blitzky zt”l 13)
Similarly, if one traveled from Tel Aviv to Yerushalayim for a few hours and intended (at the beginning of the trip) to continue from Yerushalayim to Chevron on that very day, one only recites Tefillas Haderech once. (ibid.)
However, if one didn’t originally intend to have a second trip at all (e.g. He traveled from Tel Aviv to Yerushalayim with the intention of staying in Yerushalayim and then he subsequently decides to travel to Chevron), a second Tefillas Haderech is required before traveling to Chevron. (ibid.)
Similarly, if one travels from Tel Aviv to Yerushalayim and intends (at the beginning of the trip) on sleeping in Yerushalayim and then changes his mind and decides to go back home to Tel Aviv that very day, he must recite Tefillas Haderech a second time on his way back home. (ibid.)
If one takes an extended road trip that will last longer than a day, one recites Tefillas Haderech once each day.
This is only true if one formally went to sleep that night (shinas keva). However, if one is driving through the night and he pulls over periodically to nap on the side of the road, one would not recite another Tefillas Haderech in the morning. (Ishei Yisroel 50:4) [One should try to recite Tefillas Haderech without the name of Hashem or recite it in the bracha of Shema Koleinu in Shemoneh Esrei- Halichos Shlomo end of ch. 21]
The Shulchan Aruch writes that one only recites Tefillas Haderech when travelling “one parsa” beyond the outskirts of the city limits. According to the Mishnah Berurah and many authorities “a parsa” is defined by distance and therefore one recites Tefillas Haderech if you will go at least 2.8 miles outside the inhabited area. However, Rav Ovadia Yosef zt”l (Yabia Omer 1:13) explains that “a parsa” is defined by time and one only recites Tefillas Haderech when travelling outside of the city limits for 72 minutes. The common custom (amongst Ashkenazim) is to follow the first view of the Mishnah Berurah.
The “outskirts of the city” begins from the last house. As long as there is a dwelling located within 70 2/3 amos of the previous dwelling, it is still considered within the city limits, even if this situation extends for many miles and during that time one should still not say Tefilas Haderech.
It is preferable to recite tefilas haderech during the first 2.8 miles after passing the outskirts of the city. If one forgot to do so, he still may recite it with the concluding bracha as long as he still has at least another 2.8 miles to the city of his destination. If the remaining distance is less than this, he recites tefilas haderech without the concluding bracha. (ibid.)
If one feels that it is difficult to recite it immediately after leaving the city limits, you may b’dieved say Tefilat HaDerech as soon as you start your journey (when you leave your house or get in your car, etc.), even within the city. (M.B. 29) According to Rav Sroya D’Blitzky zt”l it is better to recite it within the city, than to recite it after the first 2.8 miles of the trip. Therefore, if there is a chance one will not say it within the first 2.8 miles, one should preferably recite it with in the city, when beginning his trip.