Praise be to Allah.
The Muslim should try to use something as a sutrah (screen) in front of him when he is praying. This is a confirmed Sunnah. Some scholars are of the view that it is obligatory to have a sutrah when praying.
There is a warning issued to the one who walks in front of a person who is praying. It was narrated in al-Saheeh that Abu Juhaym said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “If a person who passes in front of someone who is praying knew (the burden of sin) that he bears, he would rather stand for forty than pass in front of him.” Abu al-Nadr said, “I do not know whether he said forty days or months or years.” (Narrated by al-Bukhari, al-Salaah, 480; Muslim, al-Salaah, 507).
With regard to the distance beyond which a person may pass in front of one who is praying without a sutrah, there are a number of opinions among the scholars. It is sufficient for us to mention the stronger of these two opinions. Some of the scholars said that the distance depends on ‘urf (local custom)
Shaykh Ibn Baz said: When a person crosses an area which is not directly in front of the one who is praying and there is no sutrah, he is not sinning, because if he is far away from him according to what is regarded as far away in local custom, he is not regarded as one who passes in front of him; this is like one who passes beyond the sutrah.
Some of the scholars said that the distance in this case is either three cubits away from where the worshipper is standing, or the space that a sheep would need to pass in front of the worshipper when he prostrates. This is the distance prescribed for the sutrah to be in front of the worshipper, and this is the view of many scholars.
It was narrated that Sahl ibn Sa’d said: Between the place where the Messenger of Allah (peace and blessings of Allah be upon him) prayed and the wall was a space that would allow a sheep to pass. (Narrated by al-Bukhari, 474; Muslim, 508).
It was narrated from Naafi’ that whenever ‘Abd-Allah ibn ‘Umar entered the Ka’bah, he would walk towards the opposite wall, with the door behind him. So he would walk towards the wall until he was three cubits away from it, then he would pray in the place which Bilaal told him the Prophet (peace and blessings of Allah be upon him) had prayed. (narrated by al-Bukhari, 484).