Variable Length Subnet Masks (VLSM) are used to create subnetworks of varying sizes. This can be done as long as the IP address spaces of the subnets do not overlap. VLSM gives network designers the ability to not waste public IPv4 addresses by creating networks in sizes they need.
In the video tutorials below, I demonstrate how to solve a typical variable length subnet mask multiple choice question. The type of which you might see on an exam.
Video Tutorials - VLSM