My professor said that the title statement might not always be the case and gave $$x^2 \sin\left(\frac{1}{x}\right)$$ at $x=0$ as a counter-example.
But I don't seem to understand its differentiability and continuity at the point $x=0$.
Any explanation and if possible a better example are highly appreciated.
Since $x = 0$ is not in the domain of $f(x)$, let's define $f(0) = 0$. Here's how it becomes continuous if we do so.
Continuity at $x = 0$:
$$\lim_{x \to 0} x^2 \sin(\frac{1}{x}) = 0$$
The function is continuous because $\sin(t) \in [-1,1] \quad \forall t$.
Differentiability at $x = 0$:
$$\lim_{h \to 0} \frac{h^2 \sin(\frac{1}{h}) - 0}{h}$$ $$=\lim_{h \to 0} h \sin(\frac{1}{h}) = 0$$
This will hold for the LHD as well. I have only considered the RHD. (Verify it!)
Therefore $f(x)$ is differentiable as well.
Now the above explanation only holds if we define $f(0) = 0$ and not otherwise.
Now coming to the statement in the title of the question, it doesn't make much sense. Because if the derivative of a function is continuous, it is implicit that the derivative exists at that point.
Edit: In this case the derivative is not continuous. For this consider $f'(x)$ at $x \neq 0$ (can be simply obtained by applying the product rule and chain rule to $f(x)$), with the fact that $f'(0) = 0$ and observe that it indeed isn't continuous at $x =0$. Maybe your professor meant that just because the derivative exists doesn't imply that it is continuous.