How can a class not be a set? I just read on this wikipedia page, about the difference between a class and a set. 

A class that is not a set (informally in Zermelo–Fraenkel) is called a proper class, and a class that is a set is sometimes called a small class. 

So apparently, there are classes that are not sets. However, in the definition of class on the same page it says: 

a class is a collection of sets (or sometimes other mathematical objects) that can be unambiguously defined by a property that all its members share. 

If we take collection to be a synonym of set, then these two statements contradict eachother. I don't see the difference between "collection" and "set".
So my question is: How can a class not be a set, if it is defined to be a "collection" (i.e. set) of objects based on a well defined property?
 A: 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.
