Koine is simply a designation for Attic Greek as it evolved after Alexander and spread throughout the Greek world. Written koine is basically an evolution of Attic Greek, with some simplifications such as reduced use of the optative and some changes in the vocabulary such as the substitution of nouns with standard declensions for older words with irregularities, e.g. πλοιον for ναυς. By the time koine emerged, a form of Attic Greek had become widespread throughout the Greek world, at least in literate environments, but the language did not cease to evolve, just as English today is different from the English written and spoken in the early 19th century.
But koine is a catch-all term, and there were many registers – formal, popular, sub-literary, etc., and regional variations. Since the books of the New Testament were written in Greek after the death of Alexander, they are said to be written in koine, although there are substantial differences in language among the various books. So the books of the New Testament represent different types of koine. Sometimes the term “koine” is used to mean “New Testament Greek,” but that is doubly misleading because koine really encompasses much more than the New Testament, and the New Testament itself doesn’t consist of a single type or dialect of koine Greek.
Polybius, in the 2d c. BCE, I think, was the first major author whose work has survived to write in koine–that is, he decided not to make an effort to model his language on the Greek of 5th-4th century Attic prose. Later, in the Roman period, writers such as Plutarch and Galen also chose to write in contemporary Greek, and not in a self-consciously Atticizing language. But anyone who knows Attic Greek can read these authors with no more difficulty than Plato or Lysias or Demosthenes.
However, there were always writers who chose to model their language on Attic Greek. In particular, there was a major revival of Attic Greek in the 2d century CE (sometimes referred to today as the “Second Sophistic”), by writers such as Aelius Aristides and Lucian, that is, they tried, with considerable success, to use the grammar and syntax of Attic Greek, and to avoid vocabulary not found in the major Attic authors.
“Atticism” continued well into the Byzantine period, even as the spoken language moved further and further away from the Attic of classical Athens. Procopius (6th c. CE) is a case in point. As a historian, he tried to write in Thucydidean Greek, to the point where he felt compelled to describe churches and explain what they are in pure Attic Greek as if he were writing for a 4th c. BCE readership about strange and alien institutions.