It is not clear to me whether the OP is looking for a formal statement of a result and a proof or not. But s/he might be, and if not the OP than someone else probably will be.
The result you have in mind is:
Theorem (Second Derivative Test): Let $f$ be a real-valued function defined and twice differentiable on an interval which contains a real number $a$ as an interior point. Suppose further that $f'(a) = 0$. Then:
(i) If $f''(a) > 0$, then $f$ has a local minimum at $a$.
(ii) If $f''(a) < 0$, then $f$ has a local maximum at $a$.
The proof can be found, for instance, in $\S$ 5.5.3 of these notes. But let me say something about it here. It suffices to treat the case in which $f''(a) > 0$; otherwise replace $f$ with $-f$. We observe that since $f''(a) = (f')'(a) > 0$, the derivative $f'$ is increasing through $a$. Since it is zero at $a$, there is some small interval $[a-\delta,a+\delta]$ around $a$ such that in this interval and to the left of $a$, $f'$ is negative, and in this interval and to the right of $a$, $f'$ is positive. Using the fact that a function which has a derivative of constant sign on an interval is monotone there, we find that $f$ is decreasing on $[a-\delta,a]$ and increasing on $[a,a+\delta]$. This means it has a local minimum at $a$.
One of the merits of seeing the proof of a result is that it helps you understand the result's limitations and the necessity of the hypotheses (if all the hypotheses are indeed necessary; for these basic calculus facts you can be pretty confident that time would have eroded away any truly extraneous hypotheses, although if you're a sufficiently serious student of analysis you'll find that many if not most of the results of basic calculus could be technically strengthened in one way or another). Here you ask what goes wrong if $f''(a) = 0$. Well, everything: we no longer know that the graph of the derivative is either turning upward at $a$ or turning downward at $a$. In other words the "sign analysis" of $f'$ need not take either of the following simple forms:
$----- 0 +++++ $ when $f''(a) > 0$
$+++++ 0 -----$ when $f''(a) < 0$.
Without that information we're helpless to argue the existence of a local minimum or local maximum. Really helpless, in the sense that simple examples like $f(x) = x^3$ at $a = 0$ show that such things need not exist!
Finally, this is not the point, but your question leads me to suspect that you think "inflection point" means $f''(a) = 0$. It doesn't: it implies $f''(a) = 0$ but is stronger [in just the same way that "local extremum" implies $f'(a) = 0$ but is stronger]: we need the sign of $f''$ to change through the point $a$ just as $f'$ does in the two diagrams above. An inflection point has a geometric meaning: it signals a change in the concavity. Thus for instance $f(x) = x^4$ has $f''(0) = 0$ but does not have an inflection point at $0$, and indeed it is convex (or as we say in freshman calculus, "concave up") on its entire domain.