Glory be to the Father, and to the Son, and to the Holy Ghost. As it was in the beginning, is now, and ever shall be, world without end. Amen.
Source of the text: Traditional Catholic doxology, long in public use.
The Glory Be is a short prayer of praise to the Holy Trinity, also called the lesser doxology. Catholics pray it at the end of each decade of the Rosary, at the end of the psalms in the Liturgy of the Hours, and at many other times.
Where the Glory Be comes from
Short doxologies giving glory to the Father, the Son and the Holy Ghost have closed Christian prayer from early centuries. In Latin it is the Gloria Patri.
The second half, As it was in the beginning, is a Western addition. In 529 the Synod of Vaison said these words were used in Rome, the East and Africa as a protest against the Arian heresy, and ordered them said in Gaul as well. The Catholic Encyclopedia notes that the synod was mistaken about the East, where the words have never been used.
Sources: Catholic Encyclopedia, "Doxology".
How and when to pray it
Pray it after each decade of the Rosary, at the end of a psalm, or on its own as a quick act of praise during the day.
Many people bow the head at the names of the three Persons.
A verse from the Douay-Rheims
The grace of our Lord Jesus Christ and the charity of God and the communication of the Holy Ghost be with you all. Amen.
Douay-Rheims, 2 Cor 13:13
A saint tied to this prayer: All Saints, November 1.