The last decade has witnessed the rise of the proliferation of Internet-enabled devices. The Internet of Things (IoT) is becoming ever more pervasive in everyday life, connecting an ever-greater array of diverse physical objects. The key vision of the IoT is to bring a massive number of smart devices together in integrated and interconnected heterogeneous networks, making the Internet even more useful. Therefore, this paper introduces a brief introduction to the history and evolution of the Internet. Then, it presents the IoT, which is followed by a list of application domains and enabling technologies. The wireless sensor network (WSN) is revealed as one of the important elements in IoT applications, and the paper describes the relationship between WSNs and the IoT. This research is concerned with developing energy-efficiency techniques for WSNs that enable the IoT. After having identified sources of energy wastage, this paper reviews the literature that discusses the most relevant methods to minimizing the energy exhaustion of IoT and WSNs. We also identify the gaps in the existing literature in terms of energy preservation measures that could be researched and it can be considered in future works. The survey gives a near-complete and up-to-date view of the IoT in the energy field. It provides a summary and recommendations of a large range of energy-efficiency methods proposed in the literature that will help and support future researchers. Please note that the manuscript is an extended version and based on the summary of the Ph.D. thesis. This paper will give to the researchers an introduction to what they need to know and understand about the networks, WSNs, and IoT applications from scratch. Thus, the fundamental purpose of this paper is to introduce research trends and recent work on the use of IoT technology and the conclusion that has been reached as a result of undertaking the Ph.D. study.