The word amen comes from the imperfect tense of the verb "to establish". It means "may it be established" or "it will be established".
In ancient Israel the word amen was said by someone who had heard a declaration, to voice agreeement and commitment. This happens twice in Torah. The sotah who is accused of adultery says "amen, amen" in agreement with the potential curse said by the priest (Numbers 5:22). Before entering the Promised Land the Levites recited twelve curses to which all the other Israelites were commanded to listen and then say amen (Deuteronomy 27:15). After the Babylonian Exile, this usage occurs a third time in Nehemiah 5:13.
Later, it appears that amen was used by a congregation after a leader said a prayer on their behalf, to demonstrate agreement spiritual unity. Examples are found in First Chronicles 16:36, Nehemiah 8:6, and Psalm 106:48.
Also in later years, the word amen is used to simply demonstrate hope or certainty that something will happen. Jeremiah does so twice (verses 11:5 and 28:6).
Yeshua frequently used amen as Jeremiah did, to demonstrate certainty that something will happen. Most English translations hide this by translating amen as "truly", "verily", or "surely". (According to John's gospel Yeshua has a habit of repeating the word twice.)
It appears that in the first century someone saying a prayer would sometimes but not always conclude with amen. Yeshua does so in Matthew 6:13. Paul does so numerous times. Peter does twice (First Peter 4:11 and 5:11). John does once (Revelation 1:6). Heavenly beings do so once (Revelation 7:11-12). In similar self-agreement, the writers of the gospels, and the writers of many of the apostolic letters, also ended their own texts with amen (Matthew 28:20, Mark 16:20, Luke 24:53, and John 21:25).
The Apostolic Writings show an additional new use of amen in use during the first century: someone in a congregation had the role of saying amen to offer vicarious agreement for those present who could not themselves voice agreement (i.e., children). In First Corinthians 14:16 we read that one reason Paul is against people speaking in tongues in public without an interpretation is:
...if you are praising in the Spirit, how will he who fills the place of the unlearned person be able to say the "amen" upon your thanksgiving, since he does not know what you are saying?
In modern times Yeshua's followers will often all say or sing amen together at the end of a prayer or song, or alternately only use amen to voice agreement with what someone else prays aloud. Recognize scripture supports either habit.