Classless InterDomain Routing (CIDR) is used in subnetting. When allocated a block of IPs with a subnet mask, CIDR allows for changing the subnet masks size to setup newer subnetworks. Basically, CIDR is a technique, and subnetting is the result.
Example
When given an IP address block a.b.c.d/16
, we can create smaller subnets by taking more than 16bits as our mask. The given block has 16bits common as the network prefix, and with CIDR we can choose a mask of varying lenght, say 24, to create more subnets.