IP addresses are 32-bit numbers that uniquely identify devices on the internet. They consist of a network portion and host portion. IP addresses are divided into classes A, B, and C based on the number of bits used for the network portion. Class A uses 8 bits for the network portion, allowing up to 16 million hosts, Class B uses 16 bits for networks of 65,000 hosts, and Class C uses 24 bits for networks of 254 hosts. IP addresses are written in dotted decimal notation with each 8-bit octet represented as a number between 0-255.