Science is a systematic enterprise that builds and organizes knowledge in the form of explanations and predictions about nature and the universe.
Technology is the collection of techniques, methods or processes used in the production of goods or services or in the accomplishment of objectives, such as scientific investigation, or any other consumer demands.
Science may drive technological development, by generating demand for new instruments to address a scientific question, or by illustrating technical possibilities previously unconsidered. In turn, technology may drive scientific investigation, by creating demand for technological improvements that can only be produced through research, and by raising questions about the underlying principles that a new technology relies on.
For the majority of human history, technological improvements were achieved by chance, trial and error, or spontaneous inspiration. When the modern scientific enterprise matured in the Enlightenment, it primarily concerned itself with basic questions of nature.