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).