From where comes the horizonal composition in a 2-category? Viewing a 2-category as a category enriched in $\mathsf{Cat}$, I can see from where comes the vertical composition: morphisms of a 2-category are objects of $\mathsf{Cat}$ and 2-morphisms of this 2-category are morphisms of $\mathsf{Cat}$, so they can be (vertically) composed if they're composable.

What I don't see, is from where the horizontal composition comes, in the diagram

we can get the composite $g_1 g_2$ and $g'_1 g'_2$, these will be in turn also objects of $\mathsf{Cat}$ and may eventually have no morphism between them! The horizontal composition $\alpha_1 \circ \alpha_2$ make no sens in this case.
So my question: can we always define the horizontal composition in a 2-category for all 2-morphisms?
EDIT To make my question more clear, is it suffisant to say that each "hom-collection" must be a category to define the horizontal composition of 2-morphisms?
 A: It comes about by applying the composition functor (composition being an arrow in $\text{Cat}$), 
$$\hom(b, c) \times \hom(a, b) \to \hom(a, c)$$ 
to a pair of morphisms, one in the hom-category $\hom(b, c)$ (where we have a morphism $\alpha_1$ between objects $g_1$, $g_1'$) and the other in the hom-category $\hom(a, b)$ (where we have a morphism $\alpha_2$ between objects $g_2$, $g_2'$). 
A: As you says $2$-categories are just categories enriched in $\mathbf{Cat}$.
This means that a 2-category is given by the following data:


*

*a set $\mathbf C$ of the objects of the $2$-category;

*for each pair $X,Y \in \mathbf C$ a category $\mathbf C(X,Y)$ (i.e. an object in $\mathbf {Cat}$);

*for each triple $X,Y,Z \in \mathbf C$ a morphism in $\mathbf {Cat}$ (i.e. a functor)
$$\circ \colon \mathbf C(Y,Z) \times \mathbf C(X,Y) \to \mathbf C(X,Z)$$

*for every object $X \in \mathbf C$ a functor $I \to \mathbf C(X,X)$, where $I$ is the category with one object and so it correspond to an object of the category $\mathbf C(X,X)$.


these data are subjected to the usual axioms of assiociativity and unit.
So the morphisms of the $2$-category $\mathbf C$ are not object in $\mathbf {Cat}$, but are the objects of the categories $\mathbf C(X,Y)$, where $X$ and $Y$ ranges over $\mathbf C$. Similarly $2$-morphisms are not morphisms of $\mathbf {Cat}$ (i.e. functors) but they are morphisms in the categories $\mathbf C(X,Y)$.
Vertical composition for $2$-cells is the operation obtained by the compositions of the categories $\mathbf C(X,Y)$.
More explicitly for every pair of objects $X$ and $Y$ in $\mathbf C$, a triple $f,g,h \in \mathbf C(X,Y)$ and two $2$-cells $\alpha \colon f \Rightarrow g$ and $\beta \colon g \Rightarrow h$, the vertical composite $\beta \circ \alpha \colon f \Rightarrow h$ is the composite of $\alpha$ and $\beta$ in the category $\mathbf C(X,Y)$.
Horizontal composition (as stated by user43208 above) is given by the arrow function of the functors
$$\circ\colon \mathbf C(Y,Z) \times \mathbf C(X,Y) \to \mathbf C(X,Z)$$
A: This picture might help:
$$\begin{matrix}
\star &\xleftarrow{g_1} & \star & \xleftarrow{g_2} & \star
\\ ||&  \mathbf{1}_{g_1} & || & \alpha_2 & ||
\\ \star &\xleftarrow{g_1} & \star & \xleftarrow{g_2'} & \star
\\ ||&  \alpha_1  & || & \mathbf{1}_{f_2} & ||
\\ \star &\xleftarrow{g_1'} & \star & \xleftarrow{g_2'} & \star
\end{matrix}$$
So it's enough to understand horizontal composition between a 1-morphism and a 2-morphism: e.g. $g_1 \circ \alpha_2$.
