Sets and classes
Solution 1:
Working in the set theory ZFC, all reasoning about classes is strictly informal. A class is informally taken to consist of all sets satisfying some condition. For example, the 'universe' is the collection of sets $x$ which satisfy $x=x$. More formally, two formulae $\phi$ and $\psi$ (with one free variable) refer to the same class if $\forall x(\phi(x) \leftrightarrow \psi(x))$, and a set $x$ is a 'member' of the class referred to by $\phi$ if and only if $\phi(x)$ is true. We denote this class by $\{ x\, :\, \phi(x)\}$, so for example $\{ x\, :\, x=x \}$ is the universe, the class of all sets.
All sets are themselves classes, but it's possible for a class not to be a set. Let $V$ denote the class of all sets satisfying $x=x$. If $V$ were a set then by the axiom schema of separation would dictate that $W = \{ x \in V\, :\, x \not \in x \}$ were a set. But then $W \in W \leftrightarrow W \not \in W$, which is obviously nonsense; so the bit where we went wrong must have been to assume that $V$ is a set! This is Russell's paradox.
Some set theories treat classes as formal objects, such as NBG and MK.
Anyway, yes, a group is defined to be a set $G$ with some operation on it, but the class of groups isomorphic to $G$ cannot be a set. To see a simple example, the isomorphism class of the trivial group contains $\{ x \}$ for each set $x$, with the trivial group operation $x \cdot x = x$. The class of all such groups cannot be a set since if it were then it would biject with the universe via $\{x\} \mapsto x$, thus making the universe a set by the axiom schema of replacement (contradicting what we saw above).
Solution 2:
In addition to all that has been written here, and before (see links below), let me give you the most informal intuition on this subject.
Consider the natural numbers $\Bbb N$. Each proper initial segment is finite, and in fact represents a particular finite number. But there is no number represented by $\Bbb N$. Why? Because $\Bbb N$ is too large to be a natural number. Natural numbers are finite, but collections of natural numbers don't have to be finite.
In modern set theories such as ZFC, the objects of the universe are sets. And every set has a size, or cardinality. Classes are those collections of sets that do not have a size. Much like $\Bbb N$ is an initial segment which is too big to be finite, classes are collections which are too big to be sets. (One remark is that in some set theories classes are objects and have measurable sizes, but those go beyond the scope of ZFC and naive set theory.)
Some links, where many words have been written:
- difference between class, set , family and collection
- Difference between a class and a set
- What should we call the 'sets' which don't exist under certain set theory axioms?
- Does $A=\{a|\forall x\in \emptyset\ H(x,a) \}$ make sense?