There are some issues in infinite dimensions such as not all linear subspaces are closed etc. So I will state the result in finite dimensions first.
Suppose $F:M\to N$ is a smooth map between smooth manifolds (the regularity can be relaxed) and $S\subset N$ is a proper submanifold (it is a closed subset of $N$) We say that $F$ is transversal to $S$ if for any $x\in M$ such that $F(x)\in S$, we have
$$
D_x F(T_xM)+T_{F(x)} S= T_{F(x)} N.
$$
More about transversality here. Then $F^{-1}(S)$ is a submanifold of $M$. This more general result reduces to the implicit function theorem. The implicit function theorem corresponds to the simplest case when $S$ consists of a single point.
Comment. Without surjectivity of the differential things can get tricky. The best one can hope for is so called Kuranishi description requiring for example the map be Fredholm. Here is a finite dimensional example. $\newcommand{\bR}{\mathbb{R}}$.
Consider
$\phi:\bR^2\oplus \bR^2\to\bR^2\oplus\bR$ given by
$$
\bR^2\oplus \bR^2\ni (x,y)\mapsto \phi(x,y)= (x,P(y))\in\bR^2\oplus \bR
$$
where $P:\bR^2\to\bR$ is a polynomial map in the variables $y=(y_1,y_2)$.
If $P=0$, then $\phi^{-1}(0)$ is the $2$-plane $0\oplus \bR^2$.
If $P(y)=(y_1-y_2)(y_1+y_2)$, then $\phi^{-1}(0)$ is the union of two lines, $y_2=\pm y_1$. This is a $1$-dimensional algebraic set with a singularity at the origin.
In both cases the image of $d\phi(0)$ is $\mathbb{R}^2\oplus 0$. The map $P:\bR^2\to\bR$ is an example of Kuranishi map.
This example is in a sense universal. If $\phi$ is Fredholm then the zero set of $\phi$ is locally the zero set of a nonlinear map between finite dimensional spaces, the so called Kuranishi map.