Firstly: The Ruling of Placing a Barrier for Prayer
Placing a barrier for prayer is a confirmed sunnah for an imam and one praying alone. This is by agreement of the four schools of jurisprudence.
Secondly: The Imam’s Barrier Suffices the Follower
The imam’s barrier suffices the follower. Ibn Hazm, Ibn `Abd al-Barr, and al-Qarafi related consensus on this.
Thirdly: Description of the Barrier
A barrier is realised by placing something erect in front of oneself, such as the cantle of a camel saddle,  The cantle of a camel saddle is the upward-protruding piece of wood at the back of the saddle. which is a cubit in height or greater. The following also suffice as barriers: walls, pillars, chairs, etc. This is the position of the majority: Hanafis, Shafi`is, and Hanbalis.
Fourthly: Standing Close to the Barrier
It is sunnah to stand close to the barrier. Consensus on this was related by Ibn Hazm and al-Nawawi through Abu Hamid.
Fifthly: How Close to be to the Barrier
One should not be further than three cubits away from the barrier. This is the position of the majority: the Hanafis, Shafi`is, and Hanbalis.
Sixthly: The Ruling of Passing Between One Praying and Their Barrier
It is not permissible to pass between someone praying and their barrier.  Some scholars excepted the Sacred Sanctuary (haram) from this. The most correct position is that there is no difference between it and other mosques with regards to the ruling, except during severe congestion, in which case it is permissible in it as well as all other mosques. This is by agreement between the four schools of jurisprudence.
Seventhly: One Offering the Prayer Stops Those Passing in Front of Him
One offering the prayer stops those passing in front of him if he is praying before a barrier. Ibn Battal related consensus on this.
Eighthly: Using Weapons to Stop Someone Passing in Front of One When Praying
It is not required that one praying stop those passing in front of him with weapons. Consensus on this was related by Ibn `Abd al-Barr, al-Qadi `Iyad, and al-Qurtubi.
Ninthly: When Someone Passes in Front of One Praying but is Out of Reach
One praying is allowed to push someone passing in front of him from his position. He does not walk toward them if he cannot reach them from his position. Consensus on this was related by Ibn `Abd al-Barr, Ibn Battal, and al-Nawawi.
Tenthly: Things that Interrupt Prayer by Passing in Front of a Praying Person
A woman, black dog, or donkey in front of a praying person invalidates their prayer. This is according to one narration from Ahmad and is a position of a group of the Salaf and Hadith specialists. Ibn al-Mundhir, Ibn Hazm, Ibn Taymiyyah, Ibn al-Qayyim, al-Shawkani, Ibn Baz, and Ibn `Uthaymin selected this position.