Embedding of closed manifolds of same dimension [closed]

The image of $F$ is closed (as $F$ is continuous and $M$ compact) and open (as $F$ is an embedding) in $N$, so if $N$ is connected then $F(M)=N$ and you indeed get a diffeomorphism.