I`tikaf means to stick to something, whether good or bad, and to block out everything else. Allah says in the Qur'an: "What then are images that you pay devotion [akifun] to them?" (Al Anbia': 52)—that is, what they devoted themselves to in worship. What is meant here is the seclusion and staying in the mosque with the intention of becoming closer to Allah.
All scholars agree on its legitimacy. The Prophet would perform I`tikaf for ten days every Ramadan. In the year that he died, he performed it for twenty days. Related by Al-Bukhari, Abu Dawud, and Ibn-Majah. The Prophet's Companions and wives performed I`tikaf with him and continued to do so after his death. Even though it is an act, which is done to get closer to Allah, there is no sound hadith concerning its merits. Abu Dawud states: “I said to Ahmad, 'Are you aware of anything concerning the virtues of I`tikaf?' He answered: 'No, except for some weak [reports].'”
Preferred I`tikaf has no specific time limit
It can be fulfilled by staying in the mosque with the intention of making I`tikaf for a long or short time. The reward will be according to how long one stays in the mosque. If one leaves the mosque and then returns, he should renew his intention to perform I`tikaf. Ya`la ibn Umayyah said: "I secluded myself in the mosque for some time for I`tikaf." `Ata told him: "That is I`tikaf, as long as you secluded yourself there. If you sit in the mosque hoping for good, it is I`tikaf. Otherwise, it is not." One who is performing the nonobligatory I`tikaf may end his I`tikaf at any time, even if it is before the period he intended to stay. 'Aishah related that if the Prophet intended to make I`tikaf, he would pray the morning prayer and begin it. One time he wanted to make I`tikaf during the last ten nights of Ramadan, and he ordered his tent to be set up. `A’ishah reported: "When I saw that, I ordered my tent to be set up, and some of the Prophets wives followed suit. When he [the Prophet] prayed the morning prayer, he saw all of the tents, and said: “What is this?” They said: "We are seeking obedience [to Allah and His Messenger." Then he ordered his tent and those of his wives to be taken down, and he delayed his I`tikaf to the first ten days [of Shawwal." The fact that the Prophet, peace and blessings be upon him, ordered his wives' tents to be struck down and asked them to leave the I`tikaf after they have made the intention for it shows that they discarded the I`tikaf after they had begun it. The Hadith also shows that a man may prevent his wife from performing I`tikaf if she did not get his permission to perform it. There is a difference of opinion over the case of the man granting permission to his wife and then rescinding it. According to Ash-Shafi`i, Ahmad, and Dawud, this is permissible for the husband, and the wife must leave her I`tikaf in such case.
The mosques in which the I`tikaf is to be performed:
There is a difference of opinion among the jurists concerning what mosques are acceptable for I`tikaf. According to Abu Hanifah, Ahmad, Ishaq, and Abu Thaur, I`tikaf is valid in any mosque in which the five prayers are held and which has a congregation. This is based on the Hadith of the Prophet: “Every mosque that has a caller to prayer and an imam is acceptable for I`tikaf." (Related by Ad-Daraqutni, but the Hadith is Mursal and weak and cannot be used as a proof.)
Malik, Ash-Shafi`i, and Dawud say that it is acceptable in any mosque, as there is no proof that restricts it to any particular mosques. The Shaf`iyyah say it is better to perform I`tikaf in a congregational mosque, as the Prophet, peace and blessings be upon him, performed I`tikaf in such a mosque, and because the number of those who attend the prayers in such a mosque is greater. If the period of I`tikaf includes the time for the Friday prayer, then one must perform it in the congregational mosque in order not to miss the Friday prayer.
The person making I`tikaf may make the call to prayer if the place from whence the call is made is either the door of the mosque or its interior courtyard. He may also go to the roof of the mosque, as all of that is considered part of the mosque. If the place for the call to prayer is outside of the mosque, and the Mu`takif makes the call, he will void his I`tikaf. The exterior courtyard is considered part of the mosque according to the Hanafiyyah and Shaf`iyyah and one narration from Ahmad. According to Malik and another narration, it is not part of the mosque and the person making I`tikaf should not go there.
Most scholars say that it is not correct for a woman to make I`tikaf in the mosque in her house (that is, the special place of her house where she performs her prayers) because the mosque in her house usually does not fall in the category of mosques and can be sold. There is no difference of opinion on this point. The wives of the Prophet always performed their I`tikaf in the Prophet's mosque.