I`tikaf is the seclusion and staying in the mosque with the intention of becoming closer to Allah. This was the practice of the Prophet during the last ten days of Ramadan especially. He would do it during other months as well. I’tikaf generally, can be done for any period of time. Males in the mosque, females in a specific space in the home.
Aishah reported that the Messenger of Allah used to practice I`tikaf in the last ten nights of Ramadan and used to say,
“Look for the Night of Qadr in the last ten nights of the month of Ramadan” [Bukhari]
Abu Hurairah said:
“Allah’s Messenger used to perform i`tikaf for ten days every Ramadan, then when it was the year in which he was taken (died), he performed I`tikaf for twenty days.”
Aishah reported that the Prophet used to practice I`tikaf in the last ten days of Ramadan till he died and then his wives used to practice I`tikaf after him.
`Aishah also reported that the Prophet :
“Used to perform i’tikaf in the last ten days of Ramadan until Allah , took him.
[Bukhari and Muslim]
Al-Bukhari records from Abu Said that the Prophet (S) said:
“Whoever makes I`tikaf with me is to make I’tikaf during the last ten (nights).”