The word "canon" comes from the Greek word, κανών. It refers to a rod or straight stick and Greeks used it metaphorically of a measuring rule or principle. The canon of Scripture refers to a collection of authoritative books. It is not an authoritative collection of books. That is, the canon contains books already recognized as Scripture and authoritative. The canon was not formed by a meeting that simply voted to put some book in or leave some book out. The history of the development of the canon is complicated. This page offers important works on the process of canonization, how books became recognized as Scripture and therefore put into the rule of the canon. Books that deviated from the rule did not go into the canon. There was a separate process that formed the canon of what Christians call the Old Testament and the process that formed the canon of the New Testament. The early rabbis debated whether books like Ecclesiastes and Esther belonged in the canon of the Hebrew Bible. During the first several centuries of the church, there was debate over whether books like 2 Peter or Revelation belonged in the canon of the New Testament.
For the New Testament, at least, canonicity was tightly connected to authorship. The early church accetped books that were written by an apostle (Paul) or an associate of an apostle (Mark). Arguments about canon therefore often involve discussion of authorship.
Beginning in the second half of the twentieth century, a new approach to biblical interpretation developed based on the concept of canonicity. Canonical Criticism was first promulgated by Brevard Childs of Yale University. Childs focused primarily on the canonical criticism of the Old Testament. Other scholars have followed him, e.g. NT scholar Robert W. Wall. Canonical Criticism affects the way individual books of the Bible are interpreted.