And this is a commonly asked question.
It is obvious that a Mg2+ ion should attract a Cl- ion more strongly than than an Na+ ion would simply because of the greater charge.
But what if we were comparing the strength of attraction between an Na+ ion Cl- with the attraction between a Rb+ion and a Cl-?
There is no difference in charge. But there is a difference in size.
Since Rb+ is a much larger ion the 1+ charge is "spread over" a far bigger surface than it would be in Na+. This makes Na+ more attractive for a Cl- ion.
But rather than write an essay explaining all this it easier to say that Na+'s small size gives it a higher charge density.
Even if you are asked to compare the strength of attraction of a 2+ and a 1+ ion you must still take the size of the ion (and hence the charge density) into account.
It may be obvious that a Mg2+ion attracts Cl- ions more strongly than than an Na+ ion would simply because of the greater charge but since it is also smaller if you do not mention charge density in an exam you will be penalised.
The same is true when comparing melting points of metals; Sodium has a lower melting point than Aluminium because Na+ has a lower charge density than Al3+ - it's less charged and larger.
It might be worth knowing that very high charge density ions, particularly Al3+ are so attractive to negative ions (polarising) that they actually draw some of the electron densityback towards them. That is what makes Aluminium compounds that are ionic behave in a slightly covalent manner.