This is called the Jordan-Brouwer separation theorem. There is a sketch of proof in the Wikipedia article; the proof uses homology theoretical methods. A possible reference is this paper by Wolfgang Schmaltz (the proof is very much too complicated to be included here...).