Homeomorphism
THE SAME SPACE UNDER DIFFERENT NAMES
Two spaces can be the same space under different names. A homeomorphism is the map that says so: a bijection on points that also matches the open sets of the two spaces to each other, in both directions. Being a bijection is not enough, and neither is being a bijection that happens to be continuous.
The definition
Let \(f : M \to N\) be a bijective map between topological spaces \((M, \mathcal{O}_M)\) and \((N, \mathcal{O}_N)\). Then \(f\) is a homeomorphism if both \(f\) and its inverse \(f^{-1}\) are continuous.
Bijectivity makes \(f^{-1}\) exist as a map at all. Continuity of \(f\) is a condition on \(\mathcal{O}_N\) pulled back into \(\mathcal{O}_M\); continuity of \(f^{-1}\) is the same condition run the other way, and it is a separate demand.
Continuous one way says nothing about the other
Continuity of \(f\) is the demand that every open set of \(N\) pull back to an open set of \(M\). Continuity of \(f^{-1}\) is the demand that every open set of \(M\) pull back along \(f^{-1}\), which is to say push forward along \(f\), to an open set of \(N\). A map can satisfy one and fail the other.
Let \(M = N = \{1,2\}\) with \(f\) the identity, \(\mathcal{O}_M\) all four subsets and \(\mathcal{O}_N\) only \(\emptyset\) and \(N\). Both sets of \(\mathcal{O}_N\) pull back to open sets, so \(f\) is continuous; \(\{1\}\) is open in \(M\) and not in \(N\), so \(f^{-1}\) is not. Generally, whenever \(\mathcal{O}_M\) holds every pullback of an \(\mathcal{O}_N\) set and something besides, that something pushes forward to a set that is not open in \(N\).
What it carries across
Because \(f\) is a bijection on points, preimage and image undo each other, and once both directions are continuous the two collections are exchanged exactly: every open set of \(N\) pulls back to one of \(M\), every open set of \(M\) pushes forward to one of \(N\), nothing left over.
So anything defined out of the open sets alone must agree on the two spaces: ask such a question of \(M\), carry the sets across, and you have asked it of \(N\). The pairing on points is what carries them. A correspondence between the two collections with no such pairing beneath it does not: a one-point space and a two-point space, each with only \(\emptyset\) and the whole set open, have collections that match perfectly and are not the same space.