IP addresses are unique identification numbers given to devices to connect to the internet. There are two main types: IPv4 and IPv6. IPv4 addresses are 32-bit and are divided into 5 classes - A, B, C, D and E - with different network and host address ranges. MAC addresses are 48-bit unique hardware numbers embedded in network cards during manufacturing that serve as the physical address of network devices.