The fourth industrial revolution taking place in the industrial sector is related to the increasing digitization and linkage of goods, products, value chains and business models. Industry 4.0 is based on the global connection of people, things and machines. By connecting devices and sensors to the internet, we are entering a new era of data analysis, connectivity and automation. This gives great opportunities for innovation and progress, previously unattainable in such a dimension. The term Internet of Things (IoT) has spread along with the vision of a world instrumented with intelligent inputs and outputs able to communicate with each other through internet data and technologies. IoT is being implemented in various areas of the modern economy, for example, healthcare, quality control, logistics, energy, agriculture and production. The Industrial Internet of Things (IIoT) blazes the trail to a better understanding of the manufacturing process, thus enabling efficient and sustainable production. The paper explains the concepts of IoT, IIoT and Industry 4.0. It highlights the accompanying opportunities, threats and challenges related to their implementation. Additionally, it presents an outline of computing architecture in IoT and related energy consumption issues. Moreover, it provides examples of application and IIoT research profiling.