(Adapted from Easton Bible Dictionary)
Synagogues began during the Jewish exile when Jews did not have access to their Temple. Synagogues were places where the local Jewish community gathered. When they gathered, they prayed prescribed prayers and read prescribed parts of the Old Testament. Men were invited to teach about the Scripture which had been read. Jesus frequently taught in the synagogues (Luke 4:15, 22). Jesus was in the habit of attending the synagogue (Luke 4:16).
Additionally, accused violators of God’s Law were examined and punished in the synagogue. So, it also served as a criminal court (Matt. 10:17; Luke 12:11). Sometimes the punishment was to be “put out of the synagogue” (John 9:22; 12:42). This meant being excluded completely from the Jewish community.