Globally, data security and privacy over the Internet of Things (IoT) are necessary due to its emergence in daily life. As the IoT will soon invade each part of our lives, attention to IoT security is significant. The nature of attacks is dynamic, and addressing this requires designing dynamic methods and a self-adaptable scheme to discover security attacks from malicious use of IoT equipment. The best detection mechanism against attacks from compromised IoT devices includes machine learning techniques. This study emphasizes the latest literature on attack types and uses a scheme based on machine learning for network support in IoT and intrusion detection. Therefore, the current work includes a thorough analysis of multiple intelligence methods and their deployed architectures of network intrusion detection, focusing on IoT attacks and machine learning-based intrusion detection schemes. Moreover, it explores methods based on machine learning appropriate for identifying IoT devices associated with cyber attacks.