The Internet of Things (IoTs) has been one of the innovations that have gained the most traction in recent years across a range of applications. For communications, analysis, computation, and monitoring of various environments, the smart devices are wired/wirelessly connected. The items are diverse, have little storage, and become less powerful. Since traditional-based existing security mechanisms are incompatible with the IoTs, implementing the IoTs system poses security and privacy issues.In this article, in-depth layer-by-layer identification of the security concerns in the IoTs system is done. A thorough analysis of related technologies, including blockchain incorporation with the IoTs security, artificial intelligence, and machine learning, is conducted. In the study of this survey’s findings, security issues resolved by machine learning, artificial intelligence, and blockchain technology are mentioned along with challenging issues.