I'tikaf refers to staying in the mosque in obedience to Allah, the Mighty and Sublime. It is legislated in the last ten days in Ramadan because the Prophet ؐ used to perform I'tikaf in the last days. Once, he ؐ observed I'tikaf in the middle ten seeking for Laylatut Qadr, thereafter he was informed that "It is in the last ten nights." So he ؐ started performing I'tikaf in the last ten days of Ramadan. On this basis, we know that I'tikaf is not legislated in other than the month of Ramadan. Likewise, what some scholars say that it is necessary for one to make intention for the duration of the stay in the mosque is a statement without evidence. The Prophet ؐ did not legislate this for his Ummah neither with his saying nor action. That is, he ؐ did not tell people to make intention for I'tikaf anytime they enter the mosque for it, and he himself did not do it. Rather, he used to observe I'tikaf in the last ten days searching for the Night of Majesty.
Thus, it is important for the one observing I'tikaf to only preoccupy himself with acts of obedience such as Salat, recitation of the Qur'an, remembrance of Allah and teaching. Some scholars opine that he should not busy himself with teaching, but face only acts of worship
because this is a specific period for definite acts of worship.
It is not permissible for the one observing I'tikaf to go out of the mosque except for a need; for instance, he can go out to eat and drink if there is no one to bring food or drink to him. He can also go out to answer the call of nature, perform the ritual bath for sexual defilement, and observe the Friday Prayer if such Prayer is not established in that mosque. The important point is that the one observing I'tikaf should not leave the mosque except for a necessity, as defined by the Shariah or nature.
Furthermore, if anyone comes to the one observing I'tikaf in order to engage him in vain talk, which lacks any benefit, it is important for him to say: "O my brother, I am observing I'tikaf it is either you assist me in obedience or you stay away from me." Allah is not shy of the truth. However, there is no harm in brief sitting and short discussion with the person observing I'tikaf. This is because the Prophet ﷺ would meet and discuss with his wives while observing I'tikaf.
Allah alone grants success.
10. The book of hajj