The Prophet, sallallahu ^alayhi wa sallam, encouraged performing the congregational prayer. He ordered the people to pray the five (5) prayers in congregation in a way that anyone who wants to pray in congregation can easily find the place to do so. When people gather in obedience to Allah, great benefits do occur.
The Prophet, sallallahu ^alayhi wa sallam, said:
صلاة الجماعة تفضل صلاة الفذ بسبع وعشرين درجة
Salatul-jama^ati tafdulu salatal-fadhdhi bisab^iw wa ^ishrina darajah.
Which means: “The congregational prayer has 27 times more reward (thawab) than the prayer of an individual.” (Related by Ibn Majah, at-Tirmidhiyy, and Ahmad ibn Hanbal.)
Praying every obligatory prayer in congregation is a communal obligation upon the free, residing, pubescent, and unexcused men.
How to Pray the Congregational Prayer (Jama^ah):
One of the people who want to pray the congregational prayer steps forward to lead the others in prayer. He is called the leader (imam). It is better if the imam is the most knowledgeable among them and the one who recites Qur’an the best.
The rest of the people stand behind the imam in straight rows, leaving no spaces in between each other. Then the imam says the opening Allahu Akbar (takbiratul-ihram). Then other people say their opening Allahu Akbar coupled with the intention. The intention means that every one of them says in one’s heart, for example, while saying Allahu Akbar with one’s tongue: “I now intend to pray the obligatory ^Asr prayer in congregation.”
The imam says all the sayings of Allahu Akbar, sami^allahu liman hamidah, and as-salamu ^alaykum out loud in all the prayers. If it is a loud prayer, the imam also says the Fatihah, Amin, and the Surah after it out loud in the first two rak^ahs. The follower says Amin out loud, but he does not recite the Surah after the Fatihah in the loud prayer; rather, he does this only in the soft prayer.