IPv4 addresses are 32-bit numbers that uniquely identify devices on the internet. They are divided into four octets and can identify both a device and its network. There are different classes of IP addresses based on the value of the first octet, with Class A having up to 127 networks and over 16 million hosts each, Class B having 16,000 networks with 65,000 hosts each, and Class C having over 2 million networks with 254 hosts each. IP addresses use a hierarchical structure to organize networks and subnetworks.