Canon law is the set of rules by which a religious (usually Christian) organization is governed. In some cases, especially historically, churches have been to a lesser or greater degree outside the jurisdiction of the secular law, instead being subject only to their own canon law.
Sources of Law
Historically, Catholic canon law has been derived from a number of different sources. The most important of these is the Bible, as interpreted by the Magisterium of the Catholic Church and applied by its courts. Second in importance are the Church Councils, whose decisions represent the will of the Church as a whole and are binding on all members. A third source of law are decisions and verdicts made by the Popes or the Papal Curia. Fourthly, earlier commentaries and collections made by prominent canon lawyers have often been consulted for interpretation. One of the most influential of such collections was the Corpus Iuris Canonici from the 1140'es. Finally, bishops have the right to legislate for their own diocese on internal matters.
Code of Canon Law
By the beginning of the 20th century, the body of canon law sources had become so diverse and unmanageable that a reconstruction and codification had become necessary. The result of this was the Code of Canon Law (Latin: Corpus Iuris Civilis, or CIC), which attempts to set out the laws of the Church in a clear and concise manner. The Code was promulgated on May 27, 1917 and entered into force on May 19, 1918. The Code was reworked following the Second Vatican Council and the new version (referred to as the 1983 Code of Canon Law) entered into force on September 27, 1983.
Brundage, James: Medieval Canon Law (London/New York 1995)
Friedberg, Emil & A. L. Richter (eds.): Corpus iuris canonici, 2 vols. (Leipzig: Tauchnitz, 1879-1881)