The root of tachanun lies in the word itself, as Daniel, exiled and seeking mercy, 'arose to seek prayer and supplications' in fasting, sackcloth, and ashes (Daniel 9:3-4), and Ezra likewise falls on his knees, spreads his hands, and confesses the people's guilt before describing the moment of grace as a תחנה from Hashem (Ezra 9:5-15); Nechemiah's communal confession, appealing to the God who 'keeps covenant and troth' despite the people's failures, belongs to this same genre of collective supplication (Nechemiah 9:5-37).
The Tehillim selections reinforce that tachanun-language is the cry of a person in distress asking for grace rather than judgment: 'Have mercy upon me, for I am weak... the Lord has heard my supplication' (Tehillim 6:2-11), the cry 'out of the depths' asking that God not mark iniquity (Tehillim 130:1-8), and the plea 'turn to me and be gracious, for I am desolate and afflicted... forgive all my sins' (Tehillim 25:1-22).
The Gemara in Rosh Hashanah 17b grounds the practice of pleading for mercy in the revelation at Sinai, where God Himself, wrapped like a prayer leader, showed Moshe the order by which Israel is to invoke the thirteen attributes whenever they sin so that He will forgive them — the paradigm behind supplicatory prayer generally.
The Gemara in Sotah 32b explains that the Amidah is recited in a whisper so as not to embarrass transgressors who confess their sins during prayer, underscoring that tachanun-type confession is meant to be a private, humbling acknowledgment of wrongdoing rather than a public display.
The practice of falling on one's face (nefillat apayim) while reciting tachanun, and the order of the congregation sitting, falling, and then rising to recite supplication aloud, is laid out by Mishneh Torah, Prayer and the Priestly Blessing 9:1-5, and the Gemara in Bava Metzia 59b shows that this falling on one's face is itself understood as invoking real consequence, since Imma Shalom prevented Rabbi Eliezer from doing so out of fear for her brother; similarly Megillah 22b records that an important person like Rav would refrain from falling on his face even on a public fast, since nefillat apayim was reserved for one who could be answered as Yehoshua was.
Rav Eliezer Melamed (Peninei Halakhah, Prayer 21:2) explains that despite the great value of nefillat apayim, the Chachamim never made it obligatory nor fixed its wording, leaving each person free to add supplication from the heart, until over the generations of the Geonim and Rishonim a fixed text of tachanun crystallized, apparently in response to the hardships of exile that dulled people's hearts and required a set formula.
Rav Eliezer Melamed (Peninei Halakhah, Prayer 21:7) further explains that nefillat apayim expresses sorrow over our failings that prevent us from standing before Hashem, which is why it is not said on days of joy, and since tachanun is fundamentally voluntary, custom extends this omission even to days of uncertain joyous status.
Practical details of the tachanun liturgy are filled in by Kitzur Shulchan Arukh Yalkut Yosef, Orach Chaim 134:1, which records the custom to increase supplications on Monday and Thursday as especially favorable days and to recite 'V'hu Rachum' aloud while standing; by Kitzur Shulchan Arukh Yalkut Yosef, Orach Chaim 581:27, which records a custom to preface the longer tachanun with a verse of shame before God; and by Rav Eliezer Melamed (Peninei Halakhah, Prayer 25:3), which explains that 'V'hu Rachum' before Barchu similarly requests atonement for the day's sins and guards against the forces of judgment active at night.
Shaarei Halacha uMinhag, Orach Chaim 78 treats tachanun as a uniquely favorable time for prayers to be answered, while also discussing when it is omitted on commemorative days or by local synagogue custom.
Kitzur Shulchan Arukh Yalkut Yosef, Orach Chaim 294:7 notes that on Motzaei Shabbat one recites 'V'atah Kadosh' instead of tachanun's usual continuation, since that hour is a time when the wicked return to Gehinnom and the congregation waits for the last minyan of Israel to finish praying.
Rishonic and later reflection situates tachanun as the human response to inevitable sin: Kuzari 3:19 states that because a person cannot avoid sin and transgression, he is obligated to pray for forgiveness in thought and deed through the blessing of Chanun who increases in forgiveness, and the Malbim on Melachim I 8:30 distinguishes tachanah from rinah and tefillah, describing tachanah specifically as the request for one's needs in the manner of unearned grace, achieved through devotion that draws down the flow of this grace.
Tanya, Part I; Likkutei Amarim 29:12-14 adds a devotional dimension, describing how recalling the stain of past sin and the blemish caused in the supernal worlds intensifies the heart's need for renewed teshuvah, situating tachanun-type confession within an ongoing inner process rather than a single completed act.
Among the responsa addressing when tachanun is said or omitted in practice, Rav Ephraim Greenblatt (רבבות אפרים ח"ח סי' רל"ד אות ב') holds that even when a brit milah or a groom is present, tachanun is still recited within selichot, though it is dropped from the regular prayer; Az Nidberu 11:1 considers whether the omission of falling on one's face is limited specifically to Friday Minchah based on the Shulchan Aruch's wording; Tzitz Eliezer 18:33 rules that tachanun and nefillat apayim are omitted in a synagogue when a bar mitzvah boy turns thirteen that day, extending to the case of a groom as well; and Rav Menashe Klein (Mishneh Halachos 8:28) maintains that tachanun should generally be said at Minchah, with omission justified only where the congregation prays after sunset or in bein hashmashot, since before sunset there is no basis to omit it.
Minhagic variations recorded by Rav Ephraim Greenblatt (Revavos Ephraim 6:59) and by Rav Mordechai Eliyahu (Maamar Mordechai Hilchot Taaniyot U'Vein HaMetzarim 18:19) further show how different communities calibrate which days or prayers include tachanun-related supplications such as Tikkun Leah's psalm, even when the fuller Tikkun Rachel formula is omitted, and Siddur Im Dach, Shaar HaTefillah frames the seated posture of prayer, in contrast to the standing Shemoneh Esrei, as corresponding to the drawing down of love through the vessels of supplication.