In more detail
The prefix length says how many leading bits identify the network, so a /24 leaves 8 bits (256 addresses) for hosts. CIDR replaced the old fixed A, B and C address classes and lets blocks of any power-of-two size be allocated and combined (route aggregation).