Why does f' = 0 gives the min or max? I understand how to calculate it, but I am just curious, why actually it works? Do we have a proof that it always works?
 A: Take $f\colon x\in\mathbb{R}\mapsto x^3$. Then $f^\prime(0)=0$, yet $0$ is not an extremum (only an inflection point).
As DonAtonio said, the converse is true — if $x$ is an extremum of a differentiable function $f$, then $f^\prime(0)=0$. A way to see it is that the curve of $f$ goes from "going up" to "going down" (or vice-versa), so the slope (derivative) must be zero (horizontal) at the extremum. Or, to prove it, consider the definition of the derivative as the limit of
$$
\frac{f(x+h)-f(x)}{h}
$$
when $h\to 0$. If $f(x)$ is a maximum, then for $h < 0$ this is $\geq 0$ (so the limit when $h\nearrow 0$ is), while for $h > 0$ this is $\leq 0$ (so the limit when $h\searrow 0$ is). Hence the limit is $0$. 
(similarly if $f(x)$ is a minimum)
A: Take an interval and draw in there a continuous function. Draw a line that is tangent to an extreme of that function. What is the value of your line's slope? Match it with the definition of derivative. What does that suggest to you?
A: 
Basically, a maximum or minimum is defined as when the function goes from going up (positive slope) to going down (negative slope) or vice versa. When the slope is 0 it's exactly between going up and going down, or a point where the curve flattens out but doesn't change direction (as in C), so the places that have slope 0 and change direction (aren't inflection points) are maximums and minimums.
A: Consider the case where a differentiable function $f(x)$ has a minimum at the point $x_{0}$. By definition, there exists a $\epsilon-$neighborhood
$$
  x = \left\{ x\in\mathbb{R} \colon \left| x - x_{0} \right| < \epsilon \right\}
$$ 
with $\epsilon>0$ where $f(x) > f(x_{0})$.
If we constrain $\delta < \epsilon$, then 
$$
\frac{f(x+\delta) - f(x)} {\delta} > 0.
$$
So within the $\epsilon-$neighborhood, a $\delta-$sequence produces a limit which approaches 0 from above.
A similar argument holds for approaching the minimum from the left.
