A codex is an early form of the modern book. Originally, "books" were individual scrolls in a given work which may have included several scrolls. Developed in the First Century C.E., the Roman "codex" (stemming from the word "trunk", as in "tree trunk") came to refer to the modern-style book -- that is, a series of papers folded repeatedly into "signatures" sewn together at one fold and placed inside a cover to form a whole.
In the 5th century, Isidore of Seville explained the relation between codex, book and scroll in the Etymologiae: "A codex is composed of many books; a book is of one scroll. It is called codex by way of metaphor from the trunks (codex) of trees or vines, as if it were a wooden stock, because it contains in itself a multitude of books, as it were of branches."
In modern scholarship, a codex tends to refer to a handwritten or copied book, as opposed to a modern printed book; that is, most books predating the Gutenburg Bible in Europe.
The plural of codex is codices.