Definition of comma category of a category. I am reading Vistoli's notes: Notes on Grothendieck topologies, fibered categories and descent theory. In page 13, he gives a definition:

For any category $\mathscr{C}$ and an object $X$ of $\mathscr{C}$, we denote by $(\mathscr{C}/X)$ the comma category, whose objects are arrows $U\to X$ in $\mathscr{C}$ , and  arrows between $\phi_{1}: U\to X, \phi_{2}: V\to X$ are $f: U\to V$ such that $\phi_{1}=\phi_{2}\circ f$.

From this definition, it seems that there could be many objects like these $\phi_{i}: U\to X$. That is there are  lots of arrows from $U$ to $X$.
However, then he said  if $\mathscr{C}$ is the category of all schemes , then $(\mathscr{C}/X)$ is the category of schemes over $X$. We know that in the category of scheme over $X$, we could realize $X$ as a final object and there is only one morphism from $U$ to $X$ namely the structure morphism. For example, when we say a variety $V$ over $k$, we need to fix a morphism $V\to \mathrm{Spec}(k)$.
So my question is what exactly definition of comma category? Do we allow $\phi: U\to X$ and $\psi: U\to X$ as two different obejcts in $(\mathscr{C}/X)$ or for any $U$, we just choose one $\phi: U\to X$ as an object in $(\mathscr{C}/X)$? If we allow  $\phi: U\to X$ and $\psi: U\to X$ as two different obejcts in $(\mathscr{C}/X)$, then why $(\mathscr{C}/X)$ is the category of schemes over $X$?
 A: The answer is that different morphisms $\phi$ and $\psi$ count as different objects.
I think that your confusion arises because you are conflating the object $U$ with the object $\phi\colon U\to X$ in the comma category.
The final object in the comma category is the morphism $\mathrm{id}\colon X\to X$. Given an object of the comma category, $\phi\colon U\to X$, the only comma-morphism from $\phi\colon U\to X$ to $\mathrm{id}\colon X\to X$ is $\phi\colon U\to X$,  because you need the morphism $f\colon U\to X$ to satisfy $
\mathrm{id}\circ f=\phi$, which requires $f=\phi$.
Note that if you have several different morphism from $U$ to $X$, then each of these morphisms is a different object in the comma category, and each of those different objects as a unique comma-morphism to the object $\mathrm{id}\colon X\to X$.
A: This instance of a comma category is often called a slice category. The objects of $\mathscr C/X$ are morphisms in $\mathscr C$ with codomain $X$. That is, there may be multiple objects of $\mathscr C/X$ with the same domain. When $X = 1$, there is just one morphism for each object $Y \in \mathscr C$, as you point out: that is, $\mathscr C/1 \cong \mathscr C$.
A scheme over $X$ (where $X$ is a scheme) is a morphism of schemes $Y \to X$, which coincides with an object of $\mathscr C/X$ (where $X, Y \in \mathscr C$). Morphisms of schemes over $X$ are similarly morphisms commuting with the maps into $X$. ($X$ here is not assumed to be the terminal object.)
