The Tarwih prayer, better known as Qiyam, is an optional/devotional prayer during Ramadan. Its colloquial name (Tarawih) has been given by Muslims. The name comes from the Arabic word tarwih (ترويح) whose literal meaning is "a breather" or "to refresh oneself". The reason being that after standing (qiyam) for a prolonged period of time, one will need to refresh themselves.
As to the number of units (raka'at), there is great leeway in regards to the number of raka'at one prays. In fact, there is no definite number according to the hadith sources. The main stipulation is that for the one who prays it, they should pray it in pairs of two raka'ah, making the taslim (saying "as-Salaamu 'alaykum...." at the end of the prayer) after every two raka'ah. Ibn 'Umar narrated,
“The Messenger of Allah ﷺ used to perform his optional night prayers at night, two rak'ah followed by two rak'ah, and at the end he would conclude with an odd rak'ah (Witr). Then he would perform two rak'ah prayer before the dawn (Fajr) prayer after hearing the Adhan, and he would make them so brief as if he could hear the Iqamah being called.” Riyad al-Salihin, Hadith 1106
كان رسول الله صلى الله عليه وسلم يصلي من الليل مثنى مثنى، ويوتر بركعة من آخر الليل، ويصلي الركعتين قبل صلاة الغداة، وكأن الأذان بأذنيه
Abu Salama bin `Abdur Rahman asked A'ishah,
“How was the prayer of Allah's Messenger ﷺ in Ramadan?” She replied, “He did not pray more than eleven raka'at in Ramadan or in any other month. He used to pray four raka'at — let alone their beauty and length — and then he would pray four — let alone their beauty and length — and then he would pray three raka'at (Witr).” She added, “I asked, ‘O Allah's Messenger ﷺ - do you sleep before praying the Witr?’ He replied, ‘O A'ishah! My eyes sleep but my heart does not sleep’.” Sahih al-Bukhari, 2013
سَأَلَ عَائِشَةَ ـ رضى الله عنها ـ كَيْفَ كَانَتْ صَلاَةُ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي رَمَضَانَ فَقَالَتْ مَا كَانَ يَزِيدُ فِي رَمَضَانَ، وَلاَ فِي غَيْرِهَا عَلَى إِحْدَى عَشْرَةَ رَكْعَةً، يُصَلِّي أَرْبَعًا فَلاَ تَسَلْ عَنْ حُسْنِهِنَّ وَطُولِهِنَّ، ثُمَّ يُصَلِّي أَرْبَعًا فَلاَ تَسَلْ عَنْ حُسْنِهِنَّ وَطُولِهِنَّ، ثُمَّ يُصَلِّي ثَلاَثًا. فَقُلْتُ يَا رَسُولَ اللَّهِ، أَتَنَامُ قَبْلَ أَنْ تُوتِرَ قَالَ " يَا عَائِشَةُ إِنَّ عَيْنَىَّ تَنَامَانِ وَلاَ يَنَامُ قَلْبِي "
Some Muslims presume that these four raka'at are to be performed with one taslim but this is incorrect. Each set of two raka'ah should be concluded with the taslim.
What is interesting and important to note here is that the Prophet ﷺ diversified his prayer: some nights he perfored eleven rak'at, others thirteen (with anything past eight being the addition of the Witr prayer). Also of importance are the proofs from A'ishah, may Allah be pleased with her, the Prophet's wife. She is one of the most intelligent and understanding people and sources of knowledge in Islam. In particular, because of her closeness to the Prophet ﷺ she provides knowledge and most knowledgeable of the Messenger's Sunnah. Her piety, knowledge and extensive memory are legendary and relates/narrates numerous ahadith of the Messenger of Allah ﷺ.
As for the merit of praying in the night, God says in the Holy Qur'an:
"Pray in the late hours of the night, as well, as an extra bonus for you, for your Lord will shortly raise you to a highly regarded position." [Qur'an, 17: 79]
وَمِنَ اللَّيلِ فَتَهَجَّد بِهِ نافِلَةً لَكَ عَسىٰ أَن يَبعَثَكَ رَبُّكَ مَقامًا مَحمودًا