This article surveys the concept of Industry 4.0 (I4.0), which has become more and more pervasive in recent years thanks to the great effort that factories, researchers, and organizations are putting into its definition and development. We present the IoT as the key I4.0 technology since it enables faster and more efficient production and management processes, leveraging the flexibility of smart, ubiquitous, connected devices. In particular, we discuss the role of the I4.0 revolution in driving the diffusion of smart products and services, by focusing on ambient intelligence and context awareness in IoT and on the so-called DIKW hierarchy. Finally, to demonstrate the practical impact of this emerging framework, we show, as practical examples, three typical I4.0 applications in the smart factory, smart home, and smart health scenarios. © 2018 IEEE.