The IoT (Internet of Things) is the interconnection of everyday devices to the internet to collect and exchange data, from vehicles and household appliances to industrial sensors and medical equipment.
M2M (Machine to Machine) is direct communication between machines, without human intervention, through cellular networks, Wi-Fi or other technologies. In practice, both allow the automatic exchange of data between devices.