In what sense is $\text{Mor}_{\text{R-alg}}(A_1,A_2)$ a category? My professor said in a lecture that if $A_1$ and $A_2$ are R-algebras, where $R$ is some commutative ring then $\text{Mor}_{\text{R-alg}}(A_1,A_2)$ is a category. Why is this true? I know that in many examples, for instance of $A_1=R[x]$ and $A_2$ is some field containing $R$ then $\text{Mor}_{\text{R-alg}}(A_1,A_2)=A_2$ so because $A_2$ is a ring it can be given the structure of a category, but why is this true in general. As I understand it, it is not true in general that $\text{Mor}(A,B)$ is a category for $A,B$ elements of some category.
 A: If $A_1$ and $A_2$ are objects in any category $C$, the collection of morphisms $\operatorname{Mor}(A_1,A_2)$ is a set, which you may view as a discrete category if you wish, that is, a category with only objects and the bare minimum of morphisms, only identity morphisms. A set in a category's clothing.
If additionally $C$ has the structure of a 2-category, then $\operatorname{Mor}(A_1,A_2)$ is a 1-category; it has objects as well as some morphisms which may hopefully be non-identity. This is essentially the definition of 2-category.
The category of categories is a 2-category (ignoring size issues), with categories as objects, functors as morphisms, and natural transformations as 2-morphisms. Which is to say, for any categories $C$ and $D$, the collection of functors $C\to D$ or $\operatorname{Mor}(C,D)$ has the structure of a 1-category, called a functor category.
The same is true of the category of enriched categories, for example categories enriched over abelian groups or $R$-modules, for $R$ a ring. It is a 2-category, of enriched categories, enriched functors, and enriched natural transformations.
Then $R$-algebras, similar to monoids or rings, may be viewed as just (enriched) categories with one object. They are therefore objects in the 2-category of categories. The morphisms between them, functors, are $R$-linear algebra homomorphisms. These functors are naturally viewed as objects in the 1-categories $\operatorname{Mor}(A_1,A_2),$ the functor category, whose morphisms are natural transformations.
Explicitly, if $f,g$ are $R$-algebra homomorphisms $A_1\to A_2$, then a natural transformation $f\to g$ is an element $a$ of $A_2$ such that $af(x)=g(x)a$ for all $x\in A_1$. As a special case, if $f$ and $g$ are identity functors, then the morphisms in $\operatorname{Mor}(A,A)$ are elements of the center of $A$. So in the general case, $\operatorname{Mor}(A_1,A_2)$ is a category whose morphisms are elements of a kind of generalized center, that commute with everything, so long as you precompose with $f$ and $g$ first. They commute elements in the image of $f$ from the right into the corresponding elements in the image of $g$ on the left.
So to sum up, $\operatorname{Mor}(A_1,A_2)$ is a category whose objects are $R$-algebra homomorphisms $A_1\to A_2$, and whose arrows from $f$ to $g$ are elements $a$ of $A_2$ that commute in the way described above, i.e. so $af(x)=g(x)a$ for all $x\in A_1.$
