Suppose $f:U \subset \mathbb{R}^3 \to \mathbb{R}$ is a smooth function defined on an open subset $U$ of $\mathbb{R}^3$ and $a \in f(U)$.
If the set $f^{-1}(a)=S$ doesn't have any critical points of $f$ then it is a regular surface.
The critical points $(x,y,z)$ are the points that $ \nabla f (x,y,z)=0$.
My question is: Is the opposite statement true, specifically:
Is it true that if $f^{-1}(a)=S$ is a regular surface, then it doesn't contain any critical points of $f$?
No; it is possible for a fiber to be regular "by accident" even if it contains critical points. For instance, consider the function $f(x,y,z)=(x^2+y^2+z^2-1)^2$. Then every point of $f^{-1}(0)$ is critical, but $f^{-1}(1)$ is a regular surface (the unit sphere).