At first, it was customary to perform Nefilat Apayim by prostrating or by bowing down. Prostration (“hishtaĥavaya”) is when the person praying lies face down, completely horizontal to the ground, with his arms and legs extended. Bowing (“kida”) is when he goes down on his knees and bends his head forward until it touches the ground (Berakhot 34b; MT, Laws of Prayer 5:13-14).
However, due to a number of concerns, the practice of Nefilat Apayim while bowing or lying prostrate was annulled. Some of the reasons are halakhic and are connected to the prohibition on prostrating oneself on a stone floor and the prohibition on an important person falling on his face before the congregation without a promise to be answered like Yehoshua bin Nun. Still, the main concern appears in Zohar (Bamidbar 121:1), which greatly reinforces the virtue of Nefilat Apayim, during which the person praying must devote his soul to God and view himself as if he has left the world, thereby atoning for all his sins. However, if one does not surrender his soul in sincerity, he endangers his life, and therefore the custom is not to fall onto the ground. (see Peninei Halakha: Prayer 21:3).
In practice, it is the custom of all Ashkenazim and some Sephardim to bend forward and lean their head on their arm. By doing so, one maintains a certain aspect of Nefilat Apayim, for that is a type of bow, yet it is not a complete bow, and there is no fear of prostration on a stone floor (BHL 131:1). Those who follow Ben Ish Ĥai are careful not to fall on their face at all, and that is the practice of many Mizraĥi Jews.
During the period of the Ge’onim, a fixed text for Nefilat Apayim and the supplications after the Amida began to crystallize, a process that continued through the time of the Rishonim until all Israel accepted the recitation of certain specific supplications as an obligation. It seems that as a result of the ever-intensifying suffering of the Exile, hearts were dulled to the point at which it was necessary to introduce a fixed text for Taĥanun. But since Taĥanun became widespread only after the scattering of Diaspora communities, the differences between the Sephardic and Ashkenazic rites are more pronounced.
Since the Nefilat Apayim prayer is one of heartbreak, negation of the body, and self-sacrifice, it is not recited on happy days (as listed in the siddur). Taĥanun is also omitted when someone celebrating a joyous occasion – for example, a bridegroom or a participant in a brit mila – is present in the synagogue (see Peninei Halakha: Prayer 21:7-8). It is also omitted in a house of mourning, since the divine attribute of judgment (midat ha-din) prevails there and should not be aggravated (MB 131:20).