Because "the set of all sets that aren't elements of themselves" leads to a contradiction called Russell's paradox (and there are other examples), we can't form arbitrary collections of sets and call them sets. But it is convenient to speak of arbitrary collections of sets, so the trick is to limit what qualifies as sets. The usual convention is to point out that, since we want to be able to collect sets however we like but aren't similarly obsessed with collecting the collections, we may as well say a set is anything that is an element of something. (A more complicated definition is needed if your theory contains urelements.) Thus classes are in principle arbitrary collections of sets, qualifying as sets if they are also elements of some class. As an example, the class of all sets that aren't elements of themselves exists but is not a set, so is not an element of any class.
In ZF(C) we only talk about the sets themselves, though when discussing it in English instead of symbols we usually include enough of the metalanguage to discuss all classes. Some variants of set theory use something called type theory, in which we say sets as I've defined them are level 0 and proper classes are level 1, and then a collection that can have proper classes as elements too needs to be at least level 2 etc. But since even this doesn't let you have such things as "the collection of all collections, regardless of level, that aren't elements of themselves", it's generally an unpopular approach. Most mathematicians instead stick with the 2-level approach, constructing just about all mainstream mathematics out of sets, discussing classes when we need to as part of a proof in ZF(C) or something similar. For example, the class of all ordinals may be necessary or convenient to discuss as part of a proof that proceeds by transfinite induction or transfinite recursion.
How do you know which classes are or aren't sets? In ZF, it's usually fairly easy because not only do the axioms often prove something qualifies, or a proof by contradiction that it doesn't, but thanks to the axiom schema of replacement proper classes are always bigger than sets.