A set is closed under an operation if the operation can be applied to any combination of values from the set to produce another value from the set. The operation will never take you out of the set.

In other words, a set V is closed under an operation f if f is a total function from Vn to V, for some number n.

For example, the set of natural numbers {0, 1, 2, ...} is closed under addition and multiplication, but not under subtraction. The set of integers {..., -2, -1, 0, 1, 2, 3, ...} is (in a sense that can be made mathematically precise) the natural closure of the natural numbers under subtraction, that is, it represents the most natural way to add additional elements such that the result is closed under addition. The set of positive rational numbers is in the same sense the closure of the positive natural numbers under division.

As another example, consider the operation that maps every person to their oldest legal child - only if they have one, of course. Most collections of people you might consider are not closed under this operation; obviously, every collections of people without children is, in the most trivial way; but the set of Moroccans is also closed under this operation, since every child of a Moroccan is and remains Moroccan by Moroccan law. This may be true for more countries, but it isn't for most.