In a simple phrase, we would say scripture teaches us that the purpose of the church is to glorify God by spreading the Gospel message and building up those who respond to it.
One of the most beautiful – though admittedly complex – descriptions of a specific mission of the church is found in Ephesians chapter 3
so that through the church the manifold wisdom of God might now be made known to the rulers and authorities in the heavenly places. This was according to the eternal purpose that he has realized in Christ Jesus our Lord Ephesians 3:10–11 (ESV)
Manifold there means multi-faceted. God is displaying His multi-faceted wisdom to heavenly beings through His earthly church, in which He has combined people from all nations, tongues and tribes in Jesus Christ.
There are other practical, down to earth roles of the church listed out in scripture as well. They are listed below along with the relevant Bible verses.
One purpose is to preach repentance for the forgiveness of sins to people from all nations in the name of Jesus, baptize those who repent and have faith in Jesus and begin teaching them to understand and obey all that Jesus asks of us.
and that repentance for the forgiveness of sins should be proclaimed in his name to all nations, beginning from Jerusalem. Luke 24:47 (ESV)
Go therefore and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit, teaching them to observe all that I have commanded you. And behold, I am with you always, to the end of the age.” Matthew 28:19–20 (ESV)
In addition to these elements, the church is to formally and informally train believers to be volunteers in helping the church carry out its mission and ministries and to assist the church in building up fellow members in unity and into an increasing level of spiritual maturity.
And he gave the apostles, the prophets, the evangelists, the shepherds and teachers, to equip the saints for the work of ministry, for building up the body of Christ, until we all attain to the unity of the faith and of the knowledge of the Son of God, to mature manhood, to the measure of the stature of the fullness of Christ Ephesians 4:11–13 (ESV)
Churches are to encourage their members and build them up (edify and educate them).
Therefore encourage one another and build one another up, just as you are doing. We ask you, brothers, to respect those who labor among you and are over you in the Lord and admonish you, and to esteem them very highly in love because of their work. Be at peace among yourselves. And we urge you, brothers, admonish the idle, encourage the fainthearted, help the weak, be patient with them all. I Thessalonians 5:11–14 (ESV)
And because the process of encouraging one another is so important to God in the life of a Christian, we are instructed in Hebrews chapter 10 to not quit attending our local church for that very reason.
And let us consider how to stir up one another to love and good works, not neglecting to meet together, as is the habit of some, but encouraging one another, and all the more as you see the Day drawing near. Hebrews 10:24–25 (ESV)
And, finally, in a number of different places in scripture, we are told that within the church, we are to encourage, exhort, admonish and hold one another accountable for living as Christ calls us to live