The derivative of a function $f(x)$ is said to exist at $x=x_0$ if both the left-derivative $Lf^\prime(x)$ and the right-derivative $Rf^\prime(x)$ exists and they are equal i.e. $$\lim\limits_{h\to 0^-}\frac{f(x_0+h)-f(x_0)}{h}=\lim\limits_{h\to 0^+}\frac{f(x_0+h)-f(x_0)}{h}.$$ However, if either of them is nonexistant or not equal to each other, the function does not have a unique derivative at $x=x_0$. The derivative is said to not exists at $x=x_0$.
For example, $f(x)=|x|$ does not have a unique derivative at $x=0$ because the left-derivative and right-derivative are unequal. In this case, can we say that $x=0$ is a minimum of the function $f(x)=|x|$? Looks like the criterion of determining maximum or minimum is in trouble. Sorry for my sloppy mathematics language.
Sometimes calculus classes skip over the important step of defining what a minimum is:
One can also define a local minimum as:
Notice that there are no derivatives involved here - you could take something nasty like the Weierstrass function, which isn't differentiable anywhere, and talk about the minimum value it obtains.
It's a theorem that if a function $f$ is differentiable (from both sides) at $x$, then $x$ can only be a local minimum (or maximum) if $f'(x)=0$ - and the proof is easy: if $f'(x) < 0$, you can see that $f(x+\alpha)$ has to be less than $f(x)$ for some small $\alpha$ due to the definition of the derivative. Likewise, if $f'(x) > 0$, one has that $f(x-\alpha)$ has to be less than $f(x)$. Either way, $f(x)$ cannot have been a local minimum. Sometimes you'll see this stated as saying that local minima/maxima may only occur at zeros of a functions derivative, points where the function is not differentiable, and endpoints of the domain.
Basically, all we can conclude from this theorem is that for $f(x)=|x|$ the only possible location for a minimum is at $x=0$. We would have to argue by other methods why this really is a minimum - but that's easy for this example because $f(0)=0$ and $0\leq f(y)$ for every $y$ since $|y|$ is always non-negative by definition.