One of the following axioms in the definition of a category is the following
- for each triplet $X, Y, Z \in \text{Obj}(C)$, a mapping called composition
$$\text{Hom}_C(X, Y) \times \text{Hom}_C(Y, Z) \to \text{Hom}_C(X, Z)$$ written $(f, g) \mapsto g \circ f$ where $\text{Hom}_C(X, Y)$ denotes the class of all morphisms with source $X$ and target $Y$.
The set-theoretic analog of this is to consider sets $A, B, C$ and functions $f : A \to B$ and $g : B \to C$. Which gives the following comutative diagram $A\xrightarrow[\ \ \ \ \ ]{\text{$f$}}B \xrightarrow[\ \ \ \ \ ]{\text{$g$}}C$. Hence $g \circ f : A \to C$.
Then the analog for $\text{Hom}_C(A, B)$ would be the set containing all functions from $A$ to $B$, that being $\mathcal{F} = \{f \ | \ f : A \to B\}$, similarly the set containing all functions from $B$ to $C$ would be $\mathcal{G} = \{ g \ |\ g : B \to C \}$, and the set containing all functions from $A$ to $C$ would be $\mathcal{H} = \{ h \ |\ h : A \to C \}$.
Then $\mathcal{F} \times \mathcal{G} = \{(f, g) \ | \ f : A \to B\ \ \text{and} \ g : B \to C\}$ and we have a function $h : \mathcal{F} \times \mathcal{G} \to \mathcal{H}$ defined by $h(f, g) = g \circ f$
If you look closely at the above I haven't said that we're working in the category Set for few reasons.
The first being that the axiom above states that for the triplet of objects there is a "mapping" called composition. What exactly is this mapping? Is it a morphism or is it something different? I doubt it's a morphism because it takes two morphisms as inputs and gives a morphism as an output (sure there are things like slice categories, but we are talking about a fixed category $C$ here).
"Mapping" usually refers to functions between sets, surely it can't be that either as that would defeat the purpose of even defining a category I would think. I am sure the author here is referring to 'mapping' as sort of a function between classes (if something like that exists)?
So my questions are the following, what precisely does the author mean by "mapping" and furthermore how can one take the Cartesian product of classes? Is it the same as the cartesian product of sets?
All of my questions above are esentially to check that the contents of the axiom above is well-defined.
The mapping is a (set or class) function that takes two arrows $f$ and $g$ and gives an arrow $f\circ g$.
It is a function $\text{hom}(A,B)\times\text{hom}(B,C)\to \text{hom}(A,C)$. It is part of the definition of a category, but it is not something which exists in the category itself.
The question of classes vs sets is interesting -- some sources require all hom-sets to be sets, and there are many versions of the definition of a category that plays with these notions. Some sources call these locally small categories. In Categories for the working mathematician, they first define a meta-category as the abstract structure, and then an actual category as a category where the hom-sets are sets, if I recall correctly.
If you don't want to work with proper classes you might prefer universes -- many category theorists prefer these kinds of definitions.
See https://ncatlab.org/nlab/show/category and https://ncatlab.org/nlab/show/metacategory for some more discussion.