Your teacher is wrong. Every neighborhood of any real number contains both rational and non-rational points, so the function is continuous at 0 only.
More specifically, let $\alpha$ be a positive irrational number (in particular $\alpha\ne0$, and the argument for negative irrationals is almost the same). Let's check whether $f$ is continuous at $\alpha$. For this to hold, then for every $\epsilon>0$ there must be a $\delta$ such that
$$ |x-\alpha|<\delta \Rightarrow |f(x)-f(\alpha)|<\epsilon $$
Since $f(\alpha)=0$, the right-hand side of this is equivalent to $|f(x)|<\epsilon$.
As I'm going to prove that $f$ is not continuous at $\alpha$, I have the right to select $\epsilon$, and then I must prove that there's no $\delta$ that works for it. I choose $\epsilon=\alpha/2$. Now, for every possible positive $\delta$, the interval $(\alpha, \alpha+\delta)$ is open and therefore contains at least one rational number, which we can call $R$. Then, setting $x=R$ we get $|R-\alpha|<\delta$ (by construction), but $|f(R)|=R>\alpha$ is certainly larger than $\epsilon$, which was $\alpha/2$. Thus, $\delta$ fails to work, as promised.