- Seeking refuge with Allaah from his tribulation
It is proven in the Saheeh (authentic) Ahaadeeth that the Prophet (صلى الله علیه وسلم) used to seek refuge with Allaah from the tribulation of the Dajjaal in his prayers, and that he commanded his Ummah to dol ikewise:
"Allaahumma innaa na'oodhu bika min 'adhaabi jahannam, wa min 'adhaabi 'l-qabr, wa min fitnatee 'l-mahyaa'i wa'l-mamaat, wa min fitnatee' l-maseehi 'd-dajjaal."
"O Allaah! We seek refuge with You from the punishment of Hell, from the punishment of the grave, from the tribulations of life and death, and from the tribulation of the False Messiah (Dajjaal)." 
This Hadeeth was narrated by many Sahabah, including Anas, Abu Hurairah, 'Aa'ishah, Ibn 'Abbaas, and Sa'd (رضي الله عنهم).
- Memorising certain Aayaat from Surat al-Kahf
Al-Haafidh ad-Dhahabee said,"Seeking refuge with Allaah from the Dajjaal is mentioned in many Mutawaatir Ahaadeeth (those with numerous lines of narrators). One way of doing this is to memorise ten Ayaat from Surat al-Kahf."
Abul-Diraa reported that the Prophet (صلى الله علیه وسلم) said,
"Whoever memorises the first ten Aayaat of Surat al-Kahf will be protected from the Dajjaal." [Abu Daawood] 
- Keeping away from the Dajjaal
One way to be protected from the tribulation of the Dajjaal is to live in Madeenah or Makkah.
Abu Hurairah reported that the Prophet (صلى الله علیه وسلم) said,
"There are angels standing at the gates of Madeenah; neither plague nor the Dajjaal can enter it." [Bukhaaree, Muslim]
Abu Bakr reported that the Prophet (صلى الله علیه وسلم) said,
"The terror caused by the Dajjaal will not enter Madeenah. At that time it will have seven gates; there will be two angels guarding every gate." [Bukhaaree] 
Anas said,"The Prophet (صلى الله علیه وسلم) said, 'The Dajjaal will come to Madeenah, and he will find angels guarding it. Neither plague nor the Dajjaal will enter it, inshaa-Allaah.' " [Tirmidhee, Bukhaaree]
It has been proven in the Saheeh Ahaadeeth that the Dajjaal will not enter Makkah or Madeenah, because the angels will prevent him from entering these two places which are sanctuaries and are safe from him. When he camps at the salt-marsh (Sabkhah) of Madeenah, it will be shaken by three tremors - either physically or metaphorically - and every hypocrite will go out to join the Dajjaal. On that day, Madeenah will be cleansed of its dross and will be refined and purified; and Allaah knows best.
 Bukhaaree, Kitaab al-Janaa'iz, 2/124. Muslim, Kitaab al-Masaajid, 2/93.
 Muslim, Kitaab al-Musaafirun, 2/199. Abu Daawood, Kitaab al-Malaahim, (Hadeeth 4301), 11/401, 402.
 Bukhaaree, Baab Haram al-Madeenah, 1/28.