What exactly a function $f:X\to Y$ is? Typically we define it as a subset of $X\times Y$ such that for any $x\in X$ there is precisely one $y\in Y$ such that $(x,y)\in f$.
And so "well defined function" means: "a subset of $X\times Y$ we just defined is actually a function" which boils down to showing that (a) for any $x\in X$ there is $y\in Y$ such that $(x,y)\in f$ and (b) if $(x,y)\in f$ and $(x',y)\in f$ for some $x,x'\in X$ then $x=x'$.
Or equivalently for any $x\in X$ the set $\{y\in Y\ |\ (x,y)\in f\}$ has exactly one element.
A common example is when we deal with equivalence relationships. For example consider integers $\mathbb{Z}$ with the following relationship: $x\sim y$ if and only if $2$ divides $x-y$. Now consider the quotient set $X=\mathbb{Z}/\sim$ and
$$f:X\to\mathbb{Z}$$
$$f([x]_\sim)=x$$
$$g:X\to\mathbb{Z}$$
$$g([x]_\sim)=x\text{ mod }2$$
Our first $f$ is not well defined. Because $[0]_\sim=[2]_\sim$ but $f([0]_\sim)=0$ while $f([2]_\sim)=2$ are different values for the same argument.
But our $g$ is well defined. That's because $[x]_\sim=[y]_\sim$ if and only if $2$ divides $x-y$. Which is if and only if $(x-y)\text{ mod }2=0$ and this is if and only if $x\text{ mod }2=y\text{ mod }2$.