Let $f \in C^{\infty}(\mathbb{R}^n)$ be a real function such that $\underline{0}$ is a local minimum point for $f$ on every algebraic curve, i.e. for every algebraic curve $C$ there exists an $\epsilon > 0$ such that if $x \in B_{\epsilon}(\underline{0}) \cap C$ then $f(0) \leq f(x)$
Where $B_{\epsilon}(0) := \{ x \in \mathbb{R}^n \; : \; ||x|| < \epsilon \}$ and $C$ is the set of points that belongs to the algebraic curve
(Observe that $\epsilon$ depends on $C$).
Is it true that $\underline{0}$ is necessarily local minimum point for $f$?
Probably we can give an explicit example, but being lazy we can use Whitney extension theorem to only have to talk about some of the values at some points or sets of points, and the rest gets filled up by Whitney.
Consider the sequence of points $p_n=(1/n, e^{-n!})$ and circles $c_n=\{\|x-p_n\|=e^{-n!}\}$. The $e^{-n!}$ is there to decrease faster than any power. By Lojasiewicz's inequality, an algebraic curve is not going to intersect infinitely many of the $p_n$ or of the $c_n$.
Let's define a function $f$ such that $f(p_n)=-1/n$, the Taylor series of $f$ is zero at every point of $c_n$, and $f(0)=0$. Whitney gives us some smooth function on all of $\mathbb{R}^n$ that takes these values. In the exterior of the union of all $c_n$ and the origin, we can replace $f$ by $f^2$, just to make it non-negative there.
You can see now that on an algebraic curve passing through the origin, there will be a neighborhood of the origin not intersecting the $c_n$. Therefore, $f\geq0$ on that neighborhood. So, $f(0)$ is a local minimum. However, in every neighborhood of the origin we will have points $p_n$ at which $f$ is taking negative values.