An IP address is a unique string of numbers that identifies devices on the internet or a local network. There are two main types of IP addresses: IPv4 addresses, which have been in use for over 35 years, and IPv6 addresses, which are gradually replacing IPv4 due to IPv4 address exhaustion. IP addresses can be public, providing outside access to a network, or private for internal network use. Subnet masks allow IP addresses to be divided into a network and host portion to better organize large networks.