Why $C(X,Y)$ ,namely the morphisms between $X$ and $Y$, is assumed to be a set rather than a class? I understand that we introduce the notion of class to bypass the paradox of the "set of all sets". However, shouldn't $C(X,Y)$ considered to be the set of all morphisms between $X$ and $Y$, thus not a set? My interpretation is that it is contained in the $Mor(C)$($C$ a category), so it has to be a set, rather a class. But how exactly should we recognize an object as a class? It is somehow difficult in more general cases to know whether an object is contained in something else or not.
 A: For a category $C$, and two objects $X,Y$ in $C$, the hom-set (for homomorphism set) is given by
$$C(X,Y) = \{f \mid f \text{ is an arrow } f: X \rightarrow Y \text{ in } C\}.$$
Now, despite the name, there is no a priori reason why this should be a set, rather than a class. Indeed, it is not difficult to give an example where a hom-set is a proper class, but a bit more difficult to give an example that doesn't feel artifical. Categories where all hom-sets are sets are called locally small, and the reason why some authors restrict themselves to only considering locally small categories is (presumably) because the Yoneda Lemma, one of the most important results in category theory, only holds for locally small categories.
One example of a category which is not locally small is the category of locally small categories. Let $C$ be a category which is locally small but not small (i.e. has a proper class of objects), and let $1$ be the terminal category. Then any functor $1 \rightarrow C$ corresponds to an object of $C$, and hence the collection of functors must be a proper class as well.
Note also that this entire discussion depends very much on your chosen foundations. As @Stefan points out, allowing non-locally small categories can lead you into trouble in some foundations, and in other foundations, it does not even make sense to make this distinction.
