The word canon comes from the name of a reed that grows straight enough that it can be used as a measuring stick. Therefore, a canon is a standard or norm.
(The word ‘canon’ can also refer to a person.)
The by-laws of the ancient Church were called canons. (Many modern churches still call their by-laws canons.) When we speak of the canon of scripture, we mean the standard list of books that are recognized by the Church as Holy Scripture—or more specifically, the church by-law that affirms that list.
Some people think that officials in the ancient Church sat down and went through a stack of writings, accepting some as part of the New Testament and rejecting, banning, and suppressing others. That was not the case. It was actually a process in which the Church defended writings that were already in use as Scripture as they came under attack. For example, when Marcion began a campaign to exclude the gospels of Matthew, Mark, and John, they were in already in use as Scripture. It wasn’t until then that the Church needed to issue a formal statement that they are indeed Scripture. Eventually it became necessary to issue a list of canonical books, not to exclude the ones that weren’t on the list, but to defend the ones that were.
The history of the canon does not tell you when a given book of the New Testament first became Scripture. It tells you when it first became necessary for the Church to defend it as Scripture. The history of the canon is the history of the defense, not the acceptance, of New Testament books.
The ancient Christian writings that are not part of the canon today were never actually rejected; they were just never accepted. The ancient Church was a persecuted minority that was unable to ban or suppress books, but it did neglect the books in which it had little interest. Some writings were never widely accepted, because the ancient Church felt they were heretical. For instance, the ancient Church never had much interest in the Gospel of Thomas. Other ancient Christian writings that never found their way into the New Testament were still recognized as orthodox and were still used authoritatively as we would use church by-laws or devotional writings, but not as scripture. For example, the Didache, the Apostolic Constitutions, the epistles of Clement and Ignatius, various ancient liturgies, and the Nicene Creed were all influential in ancient times and still play a role in modern ecumenism.
The Nicene Creed, though not scripture, is canonical, because it appears in the canons of the first three ecumenical councils. It was formulated at the first ecumenical council of Nicaea in 325, it was expanded at the second ecumenical council at Constantinople in 381 to defend the deity of the Holy Spirit, and it was made inalterable by local councils at the third ecumenical council at Ephesus in 431.
The ecumenical councils never dealt with the New Testament canon, because there was no need. Local or regional councils were able to resolve any disputes about it.