Rolle's theorem is the particular case of Mean Value Theorem.
The Mean Value Theorem is valid for continuous functions, over a closed interval [a;b], and differentiable over the open interval (a;b).
The Mean Value Theorem identity is given by:
f'(c) = [f(b) - f(a)]/(b-a) (1)
The particular aspect of Rolle's theorem is that f(a) = f(b) (2).
We'll replace (2) in (1):
f'(c) = [f(a) - f(a)]/(b-a)
f'(c) = 0/(b-a)
f'(c) = 0
f'(c) gives the slope of the tangent to the curve of f(x), at the point (c,f(c)).
Since the slope of the tangent line is 0, that means that the tangent line is parallel to x axis and the point (c,f(c)) is a local extreme point.