(Informal) definition
A class is a collection of (mathematical) constructions/ objects with a shared property.
Necessity of classes
In set theory, the set of all sets becomes somewhat messy and gives rise to several paradoxes. To avoid this, we can think of classes as a set-like object that isn’t a set to avoid paradoxes.
Thus, while there is no set of all sets, there is a class of all sets.