This is corollary $2B.4$ in Hatcher's Algebraic Topology , state as following :
If $M$ is a compact $n-$ manifold and $N$ is a connected $n-$ manifold then an embedding $h : M \to N$ must be surjective , hence a homeomorphism .
The first , $h(M)$ must be close since $h(M)$ is compact and $N$ is Hausdorff . But I don't know why $h(M)$ is open just from invariance of domain theorem ? If we have $h(M)$ is also open then by connectedness we have $h(M)=N$ hence a homeomorphism .
To be more specific , I'm trying to prove that any continuous map $f : S^{n} \to \mathbb{R^{n}}$ can not be injective ( don't use Borsuk-Ulam theorem ) .