From Dom Gueranger's Liturgical Year:
The Commencement of the Great Antiphons
The Church enters to-day on the seven days which precede the Vigil of Christmas, and which are known in the liturgy under the name of the Greater Ferias. The ordinary of the Advent Office becomes more solemn; the antiphons of the psalms, both for Lauds and the Hours of the day, are proper, and allude expressly to the great coming. Every day, at Vespers, is sung a solemn antiphon, consisting of fervent prayer to the Messias, whom it addresses by one of the titles given Him in the sacred Scriptures.
In the Roman Church, there are seven of these antiphons, one for each of the greater ferias. They are commonly called the O's of Advent, because they all begin with that interjection. In other Churches, during the middle ages, two more were added to the these seven; one to our blessed Lady, O Virgo virginum; and the other to the angel Gabriel, O Gabriel; or to St. Thomas the apostle, whose feast comes during the greater ferias; it began O Thoma Didyme. There were even Churches where twelve great antiphons were sung; that is, besides the nine we have just mentioned, O Rex Pacifice to our Lord, O mundi Domina to our Lady, and O Hierusalem to the city of the people of God.
The canonical Hour of Vespers has been selected as the most appropriate time for this solemn supplication to our Saviour, because, as the Church sings in one of her hymns, it was in the evening of the world (vergente mundi vespere) that the Messias came amongst us. These antiphons are sung at the Magnificat, to show us that the Saviour whom we expect is to come to us by Mary. They are sung twice, once before and once after the canticle, as on double feasts, and this to show their great solemnity. In some Churches it was formerly the practice to sing them thrice; that is, before the canticle, before the Gloria Patri, and after the Sicut erat.
Lastly, these admirable antiphons, which contain the whole pith of the Advent liturgy, are accompanied by a chant replete with melodious gravity, and by ceremonies of great expressiveness, though, in these latter, there is no uniform practice followed. Let us enter into the spirit of the Church; let us reflect on the great day which is coming; that thus we may take our share in these the last and most earnest solicitations of the Church imploring her Spouse to come, to which He at length yields.
As mentioned by Gueranger, there have been more than seven antiphons over the years until the number seven was established in the Roman rite. There are still some orders or rites that have an extra Marian antiphonA, the antiphon O Virgin of Virgins