The reason that there are network and host parts of an address have to do with management of the overall namespace. When someone wants an IP address block, ICANN used to assign them either a Class A, Class B, or Class C, depeding on how many hosts were needed.
In A networks, 8 out of 32 bits make up the network part
In B networks, 16 bits make up the network part
In C networks, 24 bits make up the network part.
The subnet mask is a 32 bit binary number that tells a layer 3 device what parts of the IP are network bits and what parts are host bits.
This is to allow network managers to divide their networks into smaller logical networks (the same idea as VLANS)
Now, since there is a shortage in the IPv4 address space, CIDR is used, which stands for classless interdomain routing.
In CIDR, the address is written as an IP/<number of network bits> so, for example, 10.0.0.1/8 is equivalent to 10.0.0.1 with a subnet mask of 255.255.255.0
The original intention of CIDR was to make routing tables smaller, but it is now used also for preserving as much of the IP address space as possible.