Metal atoms make electron cations by giving electrons which run in the solution and electrons remain on the metal rod. In this way, the metal rod has negative charge and negative electric potential and the metal solution has positive charge and positive electric potential.
In the ion electron equation above, M is oxidized to Mn+, that is, in this case the oxidation occurs on the electrode.
Due to the osmotic pressure of the solution, the metal cation tends to accumulate on the metal rod from the solution. If M is the atom of metal and Mn+ is the cation of metal.