Due to the significance and sanctity of the Amida, the Sages prohibit sitting within four amot of one who is praying. One reciting the Amida is standing before the Shekhina, and anyone sitting there idly appears as one who does not accept the yoke of heaven and shows contempt for a place of worship.
Four amot are approximately two meters. To be more precise, an ama is the approximate length of an average man’s arm. According to most poskim, it is approximately 45cm, which means that 4 amot are c. 180cm. However, there obviously is no need to measure one’s distance from the person reciting the Amida down to the centimeter; instead, everyone must go according to her visual estimation, and if it seems that one is not within 2 of a person praying, she may be seated.
One who is engaged in prayer or engrossed in Torah study may sit next to one reciting the Amida. Since she is engaged in prayer or Torah, there is no affront to God’s honor (based on Peninei Halakha: Prayer 17:17).
If she sat down and then the person sitting next to her began to recite the Amida, although she is neither praying nor learning, she may continue sitting there; she did not show contempt for prayer, rather, the person praying did not act lawfully by beginning to pray within someone else’s four amot. Even so, it is indeed a righteous act to show respect for the prayer by standing up (SA, Rema 102:3).
A weak or frail person, even when not engaged in prayer, may sit within another person’s four amot, since everyone knows that it is because of her weakness that she needs to sit, and therefore there is no affront to God’s honor (SA 102:2). On Yom Kippur, almost everyone is considered to be weak because of the fast, and therefore one may sit within four amot of a person praying (Beit Barukh 26:9).
There is a stringent opinion that it is forbidden to sit directly in front of a person praying, even at a distance greater than four amot, since it causes the person who is praying to appear as though she is bowing down to her. Therefore, even if she is reciting Shema, and she sat there before the other person began to recite the Amida, she must stand. Le-khatĥila, it is good to follow this opinion (SA 102:1; MB 9; Kaf Ha-ĥayim 10).