The Internet's transformation into the Internet of Things (IoT) is becoming the core of real-time and advanced technology appliances nowadays in all the fields. These real-time connected devices generate a large quantity of data. Artificial Intelligence (AI) represents the new direction of computer science, encompassing many branches including machine learning (ML), deep learning (DL), natural language processing (NLP), and many more. It can be defined by the term 'automated intelligence' as it is a program that handles prediction, forecasting, and decision-making without human interference. The automated intelligent processing and analysis of this large data (Big Data) is the key to developing smart IoT applications. ML may be used in cases where the desired effect is defined (supervised learning), where data itself is not defined beforehand (unsupervised learning), or where learning is the outcome of the interaction between the learning model and the environment (reinforcement learning). In this article, we present and discuss an important taxonomy of ML algorithms that can be used with IoT applications. Furthermore, we illustrate how various ML techniques are used to derive higher-level information from the data. Finally, it provides a basic line of investigation into real-world IoT data characteristics that involve an integration of AI with IoT.