Draw a non-trivial closed surface in $\mathbb{R}^4$ that "surrounds" $x=y=0$. In 3 dimension points are $(x, y, z) \in \mathbb{R}^3$. A line such as $x=y=0$ is one dimensional or has co-dimension $3-1=2$. As such,  we could draw a loop around $x=y=0$ and obtain an element of the homology $H_1(\mathbb{R}^3\backslash \{ line\}) \simeq \mathbb{Z}$. Sorry for using homology,  just a fancy term for "loop". 
Can we have the same picture in four dimensions?  I can't visualize it.  The equations $x=y=0$ define a 2-plane, it still has co-dimension 2 and therefore it still can be surrounded.  What's an example of a non-trivial closed surface surrounding this plane?  This would be an element of  $H_2(\mathbb{R}^4\backslash \{ plane\}) \simeq \mathbb{Z}$.
 A: Before talking about codimensions, consider this: The set $\{(x,y,z,w)\in\mathbb{R}^4:(x,y)\neq(0,0)\}$ deformation retracts onto $\{(x,y,0,0)\in\mathbb{R}^4\}$ by $f_t(x,y,z,w)=(x,y,(1-t)z,(1-t)w)$, so the complement of a plane in $\mathbb{R}^4$ is homotopy equivalent to $\mathbb{R}^2-\{(0,0)\}$.  That is, it ends up being that it is $H_1(\mathbb{R}^4-\{\mathrm{plane}\})$ that is nontrivial (rather than $H_2$).
I am visualizing the situation as a continuum of $\mathbb{R}^3$'s along the $w$ axis, each with the $z$-axis cut out.  If you take a loop around the $z$-axis in one of the $\mathbb{R}^3$'s, you won't be able to unhook it by sliding parts of the circle into neighboring $\mathbb{R}^3$'s because they all have the same missing $z$-axis.
What is your reasoning for codimension $2$ in $\mathbb{R}^3$ corresponds to $H_1$ and codimension $2$ for $\mathbb{R}^4$ corresponds to $H_2$?  It seems like a reasonable guess, though I am curious if there is some theoretical reason you had in mind.
It seems to me the actually pattern is codimension minus one, like in the sphere version Alexander duality (see Hatcher 2B.1).  If you go to the one-point compactification of $\mathbb{R}^n$ (i.e., $S^n$), the subtracted codimension-two surface is an $S^{n-2}$ submanifold.  Then $H_{n-(n-2)-1}$ of the complement is the non-trivial homology group.
