IPv4 addresses consist of four sets of numbers separated by periods, allowing for approximately 4.3 billion unique addresses. On the other hand, IPv6 addresses use a longer string of alphanumeric characters, providing a significantly larger address space to accommodate the growing number of devices on the internet.