In a set-associative cache, we divide cache blocks into sets of blocks, and every block of RAM can be mapped to one of the blocks inside a particular set of cache blocks.
Because a specific RAM block could only be found inside a limited set of cache blocks, we don't need to search the entire cache: we just need to search that one set of cache blocks. The resulting cache is both cheaper because we don't need to use as many comparator circuits (we just need a number of comparator circuits equal to the number of sets, not the number of all cache blocks) and uses less electricity. In other words, a set-associative cache is more efficient than a fully associative cache.
One reason for deciding to use a set-associative cache over a direct-mapped cache is that, in a direct-mapped cache, if we need to access a variable $x$ from a RAM block that maps to cache block #2, for example, and then need to access a different variable $y$ from another RAM block that maps to the same cache block #2, we will need to remove the 1st memory block and replace it with the 2nd one. If, at some point, we need to access $x$, then $y$, then $x$ again, then $y$ again, etc., we will find ourselves replacing the memory block each time, which takes time and slows down the work of the computer. However, with a set-associative cache, we can include both memory blocks in cache blocks that belong to the same set.