The word comes from the Classical Greek word λειτουργία (leitourgia) meaning "public work".
Repetitive formal rites are natural and common in all human activity such as organized sports or social clubs like the cub scouts.
A liturgy in the form of public worship practiced by a religious group, according to their particular traditions can range from an elaborate formal ritual such as the Eastern Orthodox Divine Liturgy and Catholic Mass, to the simplicity of the Quaker "liturgy of Silence" or a daily activity such as the Muslim salat, Jewish shacharit and the Christan "Liturgy of the Hours" (better known as the daily office).
Therefore liturgy is a communal response to the sacred through activity reflecting praise, thanksgiving, supplication, or repentance. Ritualization may be associated with life events such as birth, coming of age, marriage, and death.
Christian liturgy is a pattern for worship used (whether recommended or prescribed) by a Christian congregation or denomination on a regular basis.
The church use of the term comes from its frequent and historic use in the Greek text of the New Testament (eg Acts 13:2). It referred to a public and deliberate, well-defined ceremony. It is often translated as "minister" or "worship" in English language Bibles.
Often in Christianity a distinction is made between "liturgical" and "non-liturgical" churches based on the complexity or age of the tradition, but this confuses the universality of public worship. In fact even the simple "order of service" in a Baptist church is liturgical.
Simply, the term "the liturgy" refers to a standardized order of events observed during a religious service, be it a sacramental service or a service of public prayer.