An object i∈C of a category C is called initial if it has a unique morphism into every other object of C; that is, if for every x∈C we have
∃! f:i→x
Dually, an object t∈C is called terminal if it has a unique morphism out of every other object of C, so for each x∈C we have ∃! f:x→t.
If an object z∈C is both initial and terminal, it is called a zero object.
In Set, we can recover a notion of “element” categorically by fixing any terminal object ⋆∈Set (ie, fixing a singleton ⋆) and identifying any element x∈X with a morphism x⋆:⋆→X. (Also, this notion admits the nice property that f(x)=y iff f∘x⋆=y⋆)
We may want to generalize this by saying that in an arbitrary category C with a terminal element t, we can consider any morphism x:t→A to be in some sense an ‘element’ of A.
However, this doesn’t in general work. Consider for example the category Ab of abelian groups. Here there is a single terminal object (up to isomorphism); namely, the one-element group {e}. Then our ‘elements’ are morphisms f:{e}→A for some group A. But by the morphism laws f must send the identity to the identity, and hence there is only one choice for f; namely, f(e)=e. So this doesn’t work.
The generalized notion of elements we do end up with, instead, is that a ‘generalized element’ in an object x is just a morphism f:y→x. The idea is that different choices of indexing object y will capture different collections of elements of x, and so letting y range freely we capture all of x.