Suppose that I try to define a map $f$ from $\Bbb Q$, the set of rational numbers, to $\Bbb Z$, the set of integers by setting $f\left(\frac{a}b\right)=a$; what is $f(1)$?
$1=\frac11$, so $f(1)=f\left(\frac11\right)=1$.
But wait! $1=\frac22$, so $f(1)=f\left(\frac22\right)=2$.
And $1=\frac{100}{100}$, so $f(1)=100$.
Obviously this doesn’t work: by my ‘definition’ $f(1)$ could be any non-zero integer at all. In other words, my supposed definition doesn’t actually define anything: $f(1)$ depends on which representation of $1$ as a fraction of two integers I use, and nothing in the ‘definition’ requires me to pick one particular representation. This supposed function is not well-defined.
On the other hand, every rational number $q$ can be uniquely represented in the form $\frac{a}b$ where $\gcd(a,b)=1$ and $b>0$. Had I defined $f(q)$ to be the numerator $a$ of this specific representation, $f$ would have been a genuine function: it would have been well-defined.
Checking that a mathematical object is well-defined is really just checking that it is defined: that the purported definition actually does unambiguously specify the object.