More precisely, pick any cover of M by compatible coordinate chartss, and do the same for N. Let and be charts on M and N respectively, with being the image of and the image of . Then the conditions says that the map from to is a diffeomorphism as in the definition above (whenever it makes sense). One has to check that for every couple of charts , of two given atlases, but once checked, it will be true for any other compatible chart. Again we see that dimensions have to agree.
The whole point of diffeomorphisms is to state whether two differentiable manifolds are diffeomorphic (symbol being usually ), i.e. mapped one to the other by a diffeomorphism. Should that be the case, then as far as differential geometry is concerned, they are identical. For example .
Remark: the interesting problem is global. Indeed two manifolds of the same dimension are always locally diffeomorphic (that is kind of stupid actually, since they are locally diffeomorphic to an open set of euclidean space). More to the point, a differentiable map whose differential is invertible is always a local diffeomorphism, and in particular locally a bijection, by virtue of the Inverse Function Theorem.