In Biblical Times:
The first association with the concept of ram’s horn appears in Akeidat Yitzchak, or “The Binding of Isaac”, when the ram took the place of Yitzchak as a sacrifice. The ram’s horn is therefore used as a reminder of Abraham’s devotion and readiness to sacrifice his son and to awaken God’s mercy on his people.
The shofar was sounded as a call to rally and move on during the Jews 40 year sojourn in the desert, and and was used as an instrument when Jewish kings were crowned.
At the historic event of the Ten Commandments given on Mount Sinai, it is said,
And it came to pass on the third day in the morning, that there were thunders and lightnings and a thick cloud upon the mount, and the voice of the shofar exceeding loud so that all the people that were in the camp trembled…and when the voice of the shofar sounded long and waxed louder, Moses spoke and God answered him by a voice.
It was also blown as a call to take arms and wage war, as in the times of Gideon the judge,
And the three hundred blew their shofar and God set every man’s sword against his fellow, even throughout all the host.
On Rosh Hashanah at the start of the Yovel “Jubilee” Year, the shofar was sounded as a call to free all the slaves
…then shalt thou cause the shofar of the yovel to sound…ye make the shofar sound throughout all your land… proclaim liberty throughout all the land unto all the inhabitants thereof.
Through the ages:
The shofar was blown to announce the advent of the Shabbat on Friday afternoon.
The custom of blowing the shofar during the month of Elul before Rosh Hashanah in order to awaken the Jews to repentance and introspection before the days of awe.
And of course, when Moshiach will come, the great shofar will be sounded and our long exile will be over, as is said,
On that day a big shofar will be blown and those that were lost in Ashur, and those that were pushed off in Egypt will come, and they will bow to God on the holy mountain in Jerusalem”