Categorical equality
One thing we tend to be very concerned with is whether things are the same. This is usually trivial to define when we have access to the underlying structure of objects: if two objects are such that their structures match up exactly, then we’ll say they’re equal and call it a day.
In category theory though, we don’t have access to this information. We need to define equality strictly through morphisms and their properties.
Let’s try to build an intuition of how we could express the fact that two objects, and , are the same. Since we can only define this through the way they relate to other objects, we need to introduce a third one, , for and to have relations with. Importantly, there’s nothing special about : our reasoning must hold for any object.
Let’s take this step by step. Imagine that has a relation with - or, more formally, that there exists .

If and are the same, then we want to also have a relation with ; we want to exist. And to ensure that this is always the case, we can use one of the properties of morphisms: composition. If we were to declare that, in order for and to be the same, there must exists , then we know that the we’re looking for will always exist: .

But cannot be just any morphism: if and are the same as far as is concerned, then whatever relation it has with , it must have the same with .
This notion - two morphisms being the same even though they do not connect the same objects - is something that I struggle with a little bit, but I like to think of it that way. If can be defined by using , and defined by using , then they’re really merely two different ways of looking at the same thing.
We already know that is defined in terms of by construction: . We now want to be able to define in terms of .
Our first step will be to ensure that, given , we can build a morphism . This is simple enough, we’ve already seen how to do that: require that there exists and rely on composition.

This is almost good enough, but not quite: we don’t want to be just any morphism, but to be exactly .
If you follow on the diagram by going , then , then , then it should be pretty clear that what we want is to be . If seeing it doesn’t convince you, it’s easy enough to reason through it.
We want . By morphism associativity, this is equivalent to wanting . By morphism unitality, we know that . Bringing these two together, we want .
To summarize, we’ve identified the following constraints for and to be the same: there must exist and such that .
We’ve now set things up so that, if has a morphism to , it will have the same to . We of course also want this to be symmetric, as there’s nothing special about or in our argument. And so, by applying the exact same thought process, I hope it’s clear we’ll land on the symmetrical conclusion: we need .
In theory, we would also need to try and enforce two missing constraints: if has a morphism to , then must have the same - and vice versa.

If you just follow through the diagram though, you’ll see that the constraints we’ve set up are already enough: the existence of not only implies the existence of (by pre-composition with ), but also that and are both defined in terms of each other.
So, in conclusion: in category theory, two objects and are considered to be the same if there exists both and such that and .
Two such objects are said to be isomorphic, and and are called isomorphisms.