The Church of Scotland maintains a presbyterian polity and is thus governed by a hierarchy of bodies known as church courts. Each of these courts has a moderator and a clerk.
The Moderator presides over the meeting of the court, much as a convener presides over the meeting of a church committee. The moderator is thus the chairperson, and is understood to be a member of the court acting primus inter pares. The Moderator calls and constitutes meetings, presides at them, and closes them in prayer. The Moderator has a casting vote, but not a deliberative vote. During a meeting the title "Moderator" is used by all other members of the court as a form of address, but this is not done outwith the meetings. This convention expresses deference to the authority of the court rather than an honour for the Moderator as an individual.
The Kirk Session is the governing court of a parish. The Moderator is usually the parish minister. During a vacancy the presbytery appoints an interim moderator, usually the minister of a neighbouring parish or a retired minister although suitably trained elders may also moderate Kirk Sessions. The moderator is answerable to the presbytery, not to the kirk session, for his or her conduct in the court.
The Presbytery is the governing court of the local area. The Moderator is usually the minister of a parish within the Presbytery's bounds, or a retired minister, though an elder may also be appointed. The Moderator is appointed by the Presbytery itself and usually serves for one year. Typically the Moderator conducts worship at ordinations and other ordinances seen as acts of the presbytery. If the Moderator is not a minister, then a minister (usually a former Moderator) will lead a service of ordination or the Sacrament of the Lord's Supper.
The Moderator of the General Assembly is appointed for one year. He or she presides at the annual week-long meeting of the Assembly, and then has a representative function for the remainder of the year. Most often the Moderator is a parish minister, though Moderators are also frequently chosen from the ordained members of faculty at the four theological colleges. Occasionally (but only once in the recent history of the Church) elders have been appointed. The Moderator of the General Assembly traditionally wears a distinctive costume, though since the 1980s a series of Moderators have attempted to reduce its significance.