By albalagh.net (source: Albalagh.net - with some editing for clarity and to provide a additional details)
The Merit of the Tarawih Salah
Once the Holy Prophet (Allah bless him and grant him peace) addressed his followers on the last day of Sha'ban, on the eve of Ramadan, and said:
“There is a night in this month which is greater in excellence than a thousand months; Allah has enjoined an extra salah to be offered in the nights of this month. If a person performs a nafl act, out of his own free choice during this month, he will be entitled to receive the reward of a fard act performed in other months…” (Mishkat)
In an other tradition, Prophet Muhammad (Allah bless him and grant him peace) has regarded the Tarawih Salah as a means of the forgiveness of sins. He has said:
“The one who observes the Tarawih Salah at night during Ramadan with complete faith and devotion only for the sake of the recompense of the Hereafter, will have all of his previous sins forgiven by Allah.” (Bukhari, Muslim)
Scholars have regarded the collective offering of the Tarawih Salah as a emphasized sunnah having the kifiyah status meaning it is a communal emphasized sunnah which should be offered by at least some members of a community to avoid the blame of leaving it applying to the entire community.
According to consensus of the Companions (which is binding on Muslims), the Tarawih Salah consists of twenty rak’ahs (units) which are to be offered after Esha Salah, two at a time (that is with a salutation or taslim after every two units), preferably with a short rest after every four rak’ahs for the convenience of the congregation. The worshipper has the option to sit quietly during the rest after each four rak’ahs, or recite the tasbeeh, or offer a voluntary salah.
Each rest after four units is called a tarwiha hence the name of the prayer.
The Witr Salah is allowed to be offered collectively only during Ramadan.
It is a sunnah of the Holy Prophet (Allah bless him and grant him peace) to completely recite the entire Quran, from the beginning to the end in the Tarawih prayer over the month of Ramadan. One must understand that the Tarawih Salah is an emphasized sunnah of the Prophet (Allah bless him and grant him peace) and should be observed regularly until the end of the month of Ramadan, regardless of whether the Quran is recited less than once, once, or more than once in the mosque. Also if one's mosque does not complete the entire Quran in the month one should still attend the Tarawih as completing the Quran is not a condition for the validity of the Tarawih Prayer.
If all the men of an entire community neglect this sunnah in congregation then the entire community is guilty of wrongdoing. If they neglect it consistently then they all become sinful. Apart from the communal considerations that are specific to men, the Tarawih Salah is still a personal emphasized sunnah whether one is male or female. To neglect it once without an excuse is thus blameworthy and to consistently neglect it would be sinful.
The intention is to observe two rak’ahs of the Tarawih Salah, and thus to complete 20 rak’ahs with 10 salutations. No particular wording is required for the intention just the firm resolve in the heart to do the act.
It is preferable to offer the Witr Salah after completion of the Tarawih Salah, but if the Witr Salah is offered before the Tarawih Salah, or after offering some of the rak’ahs of the Tarawih Salah, there is no harm.
If a late comer for the Tarawih Salah finds that the Imam has stood up for Witr Salah when he has yet to complete some of his Tarawih rak’ahs he should join in witr congregation, and should complete his remaining rak’ahs of Tarawih later in his own time.
It is desirable to observe the pause of rest after every four rak’ahs for approximately the same amount of time taken to pray the four rak’ahs. However, if the followers find it hard and inconvenient they may observe a shorter pause.
It is not valid to join in the Tarawih congregation before first observing the fard salah of Esha, since the Tarawih Salah must follow the Esha salah to be considered Tarawih. So if one finds the Tarawih has commenced and one has not yet prayed Esha, one should pray Esha first even if by oneself in a corner of the mosque to anywhere that is removed from the congregation then join the congregation for Tarawih.
If a person has observed his fard salah of Esha in congregation, but has not observed the Tarawih Salah in congregation, he is permitted to offer his Witr Salah in congregation whether it is the same congregation or not.