Existence of Global Defining Function for Hypersurface Let $M$ be a smooth manifold, and $\Sigma$ a hypersurface of $M$. (That is, $\Sigma$ is smoothly a embedded subset of $M$ with codimension $1$.)
By a defining function for $\Sigma$, we mean some $f \in C^\infty(M)$ such that
$\Sigma = \{p: f(p) = 0\}$, and for any $s\in \Sigma$, $\nabla f(s) \neq 0$. 
Suppose $\Sigma$ admits a global unit normal vector field.
Using the inverse function theorem for $\mathbb R^n$, I can show the existence of local defining functions, moreover I can then construct local defining functions satisfying $\nabla f(s) = n(s)$ for $s \in \Sigma$. Therefore, functions that are "defined locally on points nearby" will be "similar to first order". However, it is not true that we can simply stitch them together to form a global defining function, since there is no guarantee that the functions actually agree on their overlaps.
Question: Does the existence of a global unit normal vector field ensure the existence of a global defining function?

On second thought, every hypersurface of $\mathbb R^n$ should admit global unit normal vector fields. I usually do differential geometry in indefinite signatures where this isn't true in general.
 A: 1) You need a local defining function. This means that $\Sigma$ must have trivial normal bundle (equivalent to your condition, existence of a normal vector field). This is not always true: even oriented manifolds can have non-oriented, 1-sided submanifolds, the model case being $\Bbb{RP}^2 \subset \Bbb{RP}^3$ (or the same example 1 dimension down). Assuming the submanifold is oriented and the total space is oriented, then you can always oriented the normal bundle, and an oriented real line bundle is trivial, so this is sufficient to guarantee the global normal field.
2) If you have a global defining function, it cuts your manifold into $f^{-1}((-\infty, 0])$ and $f^{-1}([0, \infty))$. In particular, the complement of your hypersurface is disconnected. This is not always true: consider a circle inside of a torus (that doesn't just bound a disc); cut open along it and you reveal an annulus, which is connected. 
Assuming your submanifold has trivial normal bundle and disconnected complement, you may always construct a global defining function: just make sure that you stay above $0$ on one side and less than $0$ on the other. 
