Let $M \in \mathbb R$ be a real number and $u\colon \mathbb R^2 \setminus \{0\} \to [M, +\infty)$ be an harmonic function. Then it is constant. Show that this is no longer true in higher dimensions.
The second part is easy: if $n\ge 3$ it suffices to take $$ u(x)=\frac{1}{\vert x \vert^{n-2}} \ge 0 $$ which is known to be harmonic, since it is - up to multiplicative constants - the fundamental solution.
I do not know how to solve the first part of the problem. There is a hint: "Use the logarithm" but I do not understand it. Can you help me, please? Thanks.
It depends highly on how much you know about Harmonic functions and its relation with Complex Analysis. For example, are you familiar with Liouville's theorem, that states that every Harmonic function that is defined on all of $R^{n}$ and is bounded from above or below is constant.
Defining the function $v = u - M$, we have a positive function that is harmonic if and only if $u$ is. Considering with $R^{2}$ $C$, we can consider the function $z \mapsto v(e^{z})$ that is defined on all of $C$. If you want to avoid complex numbers, consider the function $(x_{1},x_{2}) \mapsto v(e^{x_{1}} \cos(x_{2}),e^{x_{1}} \sin(x_{2}))$. This function is positive and Harmonic on $R^{2}$ and therefore constant, due to Liouville's theorem.