Fortune-tellers cooperate with the jinn; they are liars who cooperate with the shayaateen (devils), who do not help them except after they have changed their religion, and whoever changes his religion [leaves Islam] is to be executed. The ruling concerning those who go to them and believe them is that they are guilty of kufr; if they do not believe them, their prayers will still not be accepted from them for forty days.
The evidence (daleel) for the former is the hadeeth of Abu Hurayrah, according to which the Prophet (peace and blessings of Allaah be upon him) said:
“Whoever goes to a fortune-teller and believes what he says, has disbelieved in what was revealed to Muhammad.” (Narrated by al-Tirmidhi, 135; Abu Dawood, 3904; Ibn Maajah, 639; Ahmad, 9252. The hadeeth was classed as saheeh by al-Haakim (1/49), and al-Dhahabi agreed with him. Al-Haafiz ibn Hajar said, it has two corroborating reports narrated by al-Bazzaar with good isnaads. See al-Fath, 10/217)
The evidence (daleel) for the latter is the report from one of the wives of the Prophet (peace and blessings of Allaah be upon him), who said: the Messenger of Allaah (peace and blessings of Allaah be upon him) said:
“Whoever goes to a fortune-teller and asks him about anything, his prayers will not be accepted for forty days.” (Narrated by Muslim, 2230).
Source