There are 5 classes of IPv4 addresses, of which only 3 can be used for
networks....A,B, and C. IP addresses are 32 bit numbers, divided into 4
byte parts separated by a decimal point. The IP address has a network
portion and a host portion. The number of bits used to identify the
network portion and the host portion vary according to the network
class of the address.
The netmask or subnet mask was designed to further subdivide a given
network, should the need ever arise. Usually this is only done by network
admins, for various reasons) There are 3 default subnet mask
addresses which correspond to the appropriate network class. But unless
you know how to subnet or just want to subnet, you will always use the
default subnet mask and this should match the class of IP address you
are using.