Praise be to Allah
I‘tikaaf means staying in the mosque to worship Allah, may He be glorified and exalted.
The purpose of i‘tikaaf is for the individual to devote his time to worshipping Allah, may He be exalted, far removed from everything that may distract him. Therefore the Messenger (blessings and peace of Allah be upon him) used to observe i‘tikaaf in a small tent inside the mosque, so that this place would be only for the person who was observing i‘tikaaf and he would not be distracted by other people in the mosque, as he could not see them and they could not see him.
This is what the person who is observing i‘tikaaf should be keen to do, but if he speaks briefly to some of the people, or someone comes to visit him and he talks to him, there is nothing wrong with that.
But this conversation should be in a low voice, so as not to distract any of those who are remembering Allah, may He be exalted, reading Qur’an or praying in the mosque.
And this talk should be brief and should not distract him from the purpose of i‘tikaaf.
Al-Bukhaari (2035) and Muslim (2175) narrated from ‘Ali ibn Husayn that Safiyyah – the wife of the Prophet (blessings and peace of Allah be upon him) – told him that she came to the Messenger of Allah (blessings and peace of Allah be upon him) to visit him when he was in i‘tikaaf in the mosque during the last ten days of Ramadan, and she spoke to him for a while, then she got up to leave, and the Prophet (blessings and peace of Allah be upon him) got up with her.
And Allah knows best.