Although technically any modern paperback is a codex, the term is only used for manuscript (hand-written) books, produced from Late Antiquity through the Middle Ages. The scholarly study of manuscripts from the point of view of the bookmaking craft is called codicology. The study of ancient documents in general is called paleography.
New World codices were written as late as the sixteenth century. Those written before the Spanish conquests seem all to have been single long sheets folded concertina-style, sometimes written on both sides of the local amatl paper. They are therefore strictly speaking not actually in codex format, although they more consistently have "Codex" in their usual names than other types of manuscript.
The codex was an improvement upon the scroll, which it gradually replaced, first in the West, and much later in Asia. The codex in turn became the printed book, for which the term is not used. In China, because books were already printed, but only on one side of the paper, there were intermediate stages, such as scrolls folded concertina-style and pasted together at the back.
More...