The short answer
Engineering began as hands-on craft knowledge passed from experienced builders to apprentices. Over thousands of years it became a profession grounded in mathematics and science, with formal education, standards and, more recently, computer tools. The goals, such as making structures, machines and water systems that work, have changed less than the methods.
Ancient engineering: craft and experience
Early builders relied on observation, repeated practice and trial and error. Monuments in Egypt, Mesopotamia, the Indus region and the Americas show sophisticated planning, with surveying, organized labor and logistics for moving heavy materials. The earliest engineer known by name is usually said to be Imhotep, though most builders were anonymous.
Knowledge was mostly practical and often not written down in detail. Some texts survive, such as Vitruvius’s Roman treatise, but much came through apprenticeship. Archaeologists reconstruct these methods from tool marks, quarries and the buildings themselves.
Medieval and early modern: specialists and guilds
In medieval Europe, master masons and carpenters led cathedral and castle projects, working within guilds. The word “engineer” then referred mainly to people who built military machines. Parallel traditions in the Islamic world, China and India produced treatises on machines, water raising and irrigation.
During the Renaissance, designers began to combine drawing, geometry and early mechanics, and fortification became a specialized discipline.
The Industrial Revolution: new professions
Steam power, iron and railways in the 1700s and 1800s created demand for engineers who were not just builders. Civil engineering was distinguished from military engineering, and mechanical, and later electrical and chemical branches, emerged. Professional societies and engineering schools appeared in this period.
The twentieth century: science, standards and safety
Engineering became more closely tied to physics, chemistry and materials science. Failures, such as bridge and dam collapses, led to codes, testing requirements and licensing in many places. Large projects, from dams to power grids, called for teams of specialists. For a sense of how long that tradition runs, see the history of dams and the history of arch bridges.
Today: computers, simulation and new fields
Modern engineers use computer-aided design, simulation and data analysis, and work across disciplines like software, biomedical and environmental engineering. Sustainability and lifecycle thinking are now common parts of design in many countries, though practice varies.
What has stayed the same
Engineers still balance function, cost, safety and available materials. They still learn from past failures and from earlier structures, which is one reason archaeology and engineering history are useful to each other. For examples of what ancient builders achieved, see engineering wonders of the ancient world.