Canon law is the body of laws designed to govern a church. It originally emerged in the Catholic Church, which lays claim to the oldest continually functioning internal legal system in the Western world, dating back to the Council of Jerusalem in AD 50. Canon law, in any church, is generally derived by a council.
In the early Catholic Church, canon law emerged at various meetings of the Church's bishops, known as Ecumenical councils. The earliest of these took place around AD 50, between the remaining Apostles, including Peter and Paul, and is recorded in the New Testament's Acts of the Apostles. In response to the Protestant Reformation in the 1500s, the Church's Council of Trent formally codified much of Catholic canon law, revised in 1917 with the Code of Canon Law, which largely remained unchanged until the Second Vatican Council of the early 1960s.
Orthodox Churches, derived from the Greek tradition, also have their own canon law, known as the Pedalion (which means "rudder" in Greek), designed to "steer" the church. This canon law is often revised and adapted by bishops to meet local cultural standards.
Many Protestant churches have their own canon law, as well. Lutherans rely on the Book of Concord for their canon law, while the United Methodist Church has its Book of Discipline. Each church has its own canon law tradition, but the end result is the same: governing rules.