Iʿtikāf (Arabic: الاعتكاف) is a recommended worship in Islam that consists of at least three days of fasting in a masjid. Although there is no specific time to perform i'tikaf during a year, the last ten days of the month of Ramadan, as the Prophet (s) did so, is the most recommended days to do it.
Literal and Technical Meaning
I'tikaf is derived from " 'a-k-f " (عکف) which mostly means adhering to, devoting to or dedicating to something as a sign of honoring. Derivatives form this word has been used in the Qur'an in this meaning. In spite of that, "'Akif" (عاکف) (Qur'an 22:25; meaning resident) and "Ma'kuf" (معکوف) (Qur'an 48:25; meaning forbidden) are two derivatives from the same root used in the Qur'an.
In Sufism, i'tikaf means emptying your heart from worldly concerns and submitting yourself to your Lord. Hence i'tikaf means staying and residing, it also means staying and not getting away from God's threshold so that he forgives you.
Although Muslims learned how to perform i'tikaf from The their Prophet,