What's the general idea behind (rigorously?) proving that a metric space is a manifold? Perhaps this is a broad question, but I opened Spivak's Differential Geometry and on the first page, it defines a manifold as such:

A manifold is supposed to be "locally" like one of these exemplary metric spaces $\mathbb{R}^n$. To be precise, a manifold is a metric space $M$ with the following property:
If $x\in M$, then there is some neighborhood $U$ of $x$ and some integer $n\geq0$ such that $U$ is homeomorphic to $\mathbb{R}^n$.

I googled around for a couple minutes but I couldn't find any answer directly addressing how to (or how it's impossible to) prove that some metric space is a manifold. That is, according to the last sentence, proving the neighborhood $U$ of each(?) $x\in M$ is homeomorphic to $\mathbb{R}^n$ for some nonnegative integer $n$.
I'm new to differential geometry and topology, so I apologize if this is a meaningless or too-easy-to-be-asking type of question.
 A: TL;DR: It depends.
To show that a given space $M$ is a manifold, one typically exhibits for each $x\in M$ an explicit open neighbourhood $U_x\ni x$ and an explicit homeomorphism $U_x\to \Bbb R^n$. To simplify the task, one need not specifiy different $U_x$ for each point; instead it suffices to cover $M$ with open sets (which are open nighbourhoods for each point they contain). Also, instead of a homeomorphism with all of $\Bbb R^n$ it is sufficient to specify a homeomorphism with an open subset of $\Bbb R^n$ (again, this subset contains an open ball for each of its elements and open balls are in a simple fashion homeomorphic to their containin g$\Bbb R^n$).
Example:
The set $S^1=\{\,(x,y)\in\Bbb R^2\mid x^2+y^2=1\,\}$ (with metric/topology induced from $\Bbb R^2$) is a 1-manifold.
Proof:
The set $U_N:=S^1\setminus\{(0,1)\}$ is an open subset of $S^1$. On it we can define $f_N\colon U_N\to\Bbb R$, $(x,y)\mapsto \frac{x}{1-y}$ and verify that this is indeed a homeomorphism $U_N\stackrel\approx \longrightarrow\Bbb R$. Similarly, for $U_S:=S^1\setminus\{(0,-1)\}$, we have 
$f_S\colon U_S\to\Bbb R$, $(x,y)\mapsto \frac{x}{1+y}$. As $U_S\cup U_N=S^1$, we have just shown that $S^1$ is a 1-manifold. $\square$
On the other hand, showing that somehing is not a manifold may be trickier. Details depend on the specific space, of course.
Example. The set $X=\{\,(x,y)\in\Bbb R^2\mid xy=0\,\}$ is not a manifold.
Proof. The intuitive reason is the double point at $(0,0)$.
Assume $U\subseteq X$ is an open neighbourhood of $(0,0)$ and $f\colon U\to \Bbb R^n$ a homoemorphism.
Then for some $r>0$, $U$ contains the open ball $B_r((0,0))\cap X$.  Under $f$, this is homeomorphic to an open subset of $\Bbb R^n$.
Now $B_r((0,0))\cap X$ has the interesting property that it is connected, but after removing the single point $(0,0)$ it becomes disconnected (into four connected components). The same should happen with $f(B_r((0,0))\cap X)$ upon removing $f((0,0))$. However, if $n>1$ then removal of a point from a connected open set produces a connected open set (because this is true for the removal of the center from an open ball). And if $n=1$ then the removal of a point from an open set produces two, not four connected components. And if $n=0$, removal of a point from a connected open set produces the empty set. Hence for all $n\in \Bbb N$ we arrive at a contradiction. We conclude that $X$ is not a manifold. $\square$
Caution. The definition  for manifold that you quote may not be acceptd by everybody. As quoted, the set $S^1\cup\{(0,0)\}$ would be a manifold - which probably most would disagree with. Also, the space $\Bbb R^\times \Bbb R$ endowed with metric $$d\bigl((x,y),(x',y')\bigr)=\begin{cases}|x-x'|&\text{if }y=y'\\1+|x-x'|&\text{otherwise}\end{cases}$$ is a manifold under the quoted definition, but is not according to more generally accepted definitions. Apart from these two kinds non-manifolds that fit under your definition, there is a third kind, but as you seem to consider metric spaces (as opposed to general topological spaces) this third kind of problem does not apply.
A: There are also more indirect ways of proving that something is a manifold. For example you have the preimage theorem (not sure how standard that name is):

If $f : M \to N$ is a smooth map between manifold and $y \in N$ is a regular value, then $f^{-1}(y)$ is a submanifold of $M$. (Plus some further results about dimension and tangent spaces.)

Here, $y \in N$ is said to be a regular value of for all $x \in f^{-1}(y)$, the differential $df_x : T_xM \to T_yN$ of $f$ at $x$ is surjective.
So for example if you let $f : \mathbb{R}^2 \to \mathbb{R}$ be given by $f(x,y) = x^2 + y^2$, then $1$ is a regular value: you can easily compute the differential $df_{(x,y)}(u,v) = 2ux + 2vy$, which is surjective if $(x,y) \neq (0,0)$, and of course $f(0,0) \neq 1$. Thus $S^1 = f^{-1}(1) =  \{ (x,y) \in \mathbb{R}^2 \mid f(x,y) = x^2 + y^2 = 1 \}$ is a submanifold of $\mathbb{R}^2$. It's a very powerful tool.
