Looking for an example of an infinite metric space $X$ such that there exist a continuous bijection $f: X \to X$ which is not a homeomorphism I am looking for an example of an infinite metric space $X$ such that there exists a continuous bijection $f: X \to X$ which is not a homeomorphism. Please help. Thanks in advance. 

The Cantor set minus one point.
Indeed, in general let $u:U\to V$ is a non-open continuous bijection between topological spaces. Define $X=U\times\mathbf{N}^c\sqcup V\times\mathbf{N}$ (I assume $0\in\mathbf{N}$ and I mean the complement in $\mathbf{Z}$). Define $f(x,n)=(x,n+1)$ for $n\neq 0$ and $f(x,-1)=(u(x),0)$. Then $f$ is a non-open continuous permutation of $X$.
We can apply this to $V$ Cantor, $U$ Cantor minus one point. Indeed, fix a point $x\in U$ and let $U'=U\cup\{y\}$ be the 1-point compactification of $U$ and $V$ the quotient of $U'$ identifying $x$ and $y$. Then $V$ is a Cantor space, and the canonical map induced by inclusion $U\to V$ works.
Then $X$ is also homeomorphic to $U$. Indeed, first both $U\times\mathbf{N}$ and $V\times\mathbf{N}$ are homeomorphic to $U$, and hence so is their disjoint union $X$.
(I'm using that every metrizable, non-compact locally compact, non-empty, perfect and totally disconnected topological space $X$ is homeomorphic to $U$. Indeed, the 1-point compactification of $X$ then satisfies the same properties with non-compact replaced by compact, hence is a Cantor space, so $X$ is homeomorphic to a Cantor space minus a point, and this is unique, because the Cantor space is homogeneous under self-homeomorphisms, e.g., because it admits topological group structures.)

Added: For every $(X,f)$, $X$ topological space and $f$ bijective continuous non-open self map of $X$, we can obtain a another connected example taking the cone. So all examples here can be used to provide examples to the same question for restricted to connected spaces (2011 MSE post).
