By Fixed Point Theorem, I know that it deals with closed interval, for example $[0,1]$. And this theorem will be false if $[0,1]$ is replaced by $(0,1)$. A counter-example is $f:(0,1)\rightarrow (0,1)$ and $f(x)=x/2$.
I have no idea to show the only intervals are the closed intervals. How to show that it is "ONLY"?
I presume you are talking about the fact that any continuous function $f:[a,b] \to [a,b]$ has a fixed point?
You have the right idea with your counterexample to the case $[0,1]$.
The standard proof is to let $g(x)=f(x)-x$, note that $f(a) \geq a$ and $f(b) \leq b$, from which we get $g(a) \leq 0$ and $g(b) \geq 0$, then apply the intermediate value theorem to conclude that there is some $c \in [a,b]$ for which $g(c)=0$, which implies $f(c)=c$. However, this $c$ could be one of $a$ or $b$, hence the proof fails if we are only considering the open interval $(a,b)$.
So, if you assume that there exists an open interval $(a,b)$ for which every continuous function $f:(a,b) \to (a,b)$ has a fixed point, you can easily construct a counterexample by constructing a function for which $f(a)=a$, but $f(x) \neq x$ for any $x \in (a,b)$. For example, $f(x)=\frac{x}{2}+\frac{a}{2}$.
Similarly for half open intervals $(a,b]$ or $[a,b)$: $f(x) = \frac{x}{2}+\frac{a}{2}$ again and $f(x)=\frac{x}{2}+\frac{b}{2}$ work, respectively.