Examples of categories of the form $\operatorname{Hom}(X,-)$ or $\operatorname{Hom}(-,X)$ Motivation
Let $\mathcal{C}$ be the category of commutative unital rings, and let $R \in \mathcal{C}$.
The category of commutative unital R-algebras can be defined as follows:


*

*Objects: morphisms of $\mathcal{C}$ of the form $R \to A$

*Morphisms: commutative triangles in $\mathcal{C}$ of the form
$\begin{array}{ccc}
R & \to & A\\
& \searrow & \downarrow \\
& & B
\end{array}$


Question
Is this construction useful in general?
Are there other examples of the above construction (or its dual) yielding
a useful/interesting/well-known category, if we let $\mathcal{C}$ be some category other than $\operatorname{CRing}$?
 A: These constructions which are generally known as slice categories are very useful, and are special cases of comma categories. Tons of mathematical objects satisfy universal properties which boil down to being an initial or terminal object in some comma category. 
To elaborate, let $\mathcal{C}$ be a category and let $A$ be an object of $\mathcal{C}$. We then form the coslice category $(A\downarrow\mathcal{C})$ whose objects are morphisms $f:A\to X$ in $\mathcal{C}$, and whose morphisms:
$$(f:A\to X)\xrightarrow{\ \phi \ }(g:A\to Y)$$
are morphisms $\phi:X\to Y$ such that $\phi\circ f=g$. If $i:A\to Q$ is initial in this category, then that means that for every object $f:A\to X$, there is a unique map $\phi:Q\to X$ such that $f=\phi\circ i$. So, in these categories, the initial objects tend to capture the notion of unique factorization of maps, which pops up everywhere. 
I've explained the universal property of quotient spaces from this point of view in this question. 
You can find a couple more examples of comma categories here.
