At its core, an MES is a real-time system that provides direction and instruction to the factory floor to make sure the right processes are being done at the right time, by the right people (hence the "execution" moniker). The primary unit of track-and-trace is called Work In Progress, or WIP (the widgets you're making), and is often grouped into a logical and/or physical container called a Lot/Work Order. All activity in the manufacturing environment is captured including performance and quality measurements of the WIP to ensure a good finished product.
An MES will also provide significant insight on factory performance through operational dashboards and KPI reports (Key Performance Indicators), the most common of which include yield, throughput and cycle time. These feed directly into lean manufacturing initiatives designed to reduce scrap, and therefore cost. The data is directly useful: pain points become visible, inefficiencies have a number attached to them.