What are the historical evidence concerning the turning of the spyglass into an astronomical instrument, the telescope? In Sidereus Nuncius and in his private correspondence Galileo tells the reader what he did with the telescope, but he did not disclose the existence of a theory of the instrument. Still, the instruments which Galileo produced are extant and can be studied. With replicas of Galileo's telescopes that magnify 14 and 21 times, we have simulated and analyzed Galileos practices as he reported them in Sidereus Nuncius. On this ground, we propose a new solution to this old problem. We establish the knowledge of optics that Galileo had as it can be read off from the telescopes he constructed and the way he put them to use. Galileo addressed optical difficulties associated with illumination, resolution, field of view, and magnification. His optical knowledge was well thought through, originated as it did in a radically new optical framework.