Machining is any of various processes in which a piece of raw material is cut into a desired final shape and size by a controlled material-removal process. The processes that have this common theme, controlled material removal, are today collectively known as subtractive manufacturing, in distinction from processes of controlled material addition, which are known as additive manufacturing. Exactly what the "controlled" part of the definition implies can vary, but it almost always implies the use of machine tools (in addition to just power tools and hand tools).

Machining is a part of the manufacture of many metal products, but it can also be used on materials such as wood, plastic, ceramic, and composites. A person who specializes in machining is called a machinist. A room, building, or company where machining is done is called a machine shop. Much of modern-day machining is carried out by computer numerical control (CNC), in which computers are used to control the movement and operation of the mills, lathes, and other cutting machines. This increases efficiency, as the CNC machine runs unmanned therefore reducing labour costs for machine shops.