Hadith 989
Abu Hurairah (May Allah be pleased with him) reported:
عن أبي هريرة رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم : "لا يحل لامرأة تؤمن بالله واليوم الآخر تسافر مسيرة يوم وليلة إلا مع ذي محرم عليها" ((متفق عليه)) .
The Messenger of Allah (ﷺ) said, "It is not permissible for a woman who believes in Allah and the Last Day to make a journey of one day and night unless she is accompanied by a Mahram (husband or any other relative to whom she is prohibited to marry)." [Al-Bukhari and Muslim].
In plain words
The Prophet taught that a believing woman should not make a journey of a day and night unless accompanied by a mahram, a close relative she could never marry, such as a husband or other such relation.
Reference : Riyad as-Salihin 989 In-book reference : Book 7, Hadith 34