Activity (a) is a pure mathematical construct used in thermodynamics and molarity (M) is a practical concept which can conveniently carry out in the lab. Someone can tell you to prepare 0.02 M Na$^{+1}$ solution but not 0.02 a Na$^{+1}$ solution. You should rather ask, how activity and concentration related? If you open a physical chemistry text, the definition provided there is abstract and good for regurgitating in an exam only.
Before activity can be explained in a less abstract way, one has to introduce another concept called fugacity. I will quoted original wording to the inventor- G. N. Lewis the person who gave the concept of activity to the world. It is always good to see the original work to see what was going on in the mind of the inventor.
Quote from his paper:
The idea of fugacity is thus evolved from the use of vapor pressure as a measure of escaping tendency. When a substance is in equilibrium with its vapor, the fugacity, in order to fulfil the laws of escaping tendency, must be the same i both. The fugacity of a substance is therefore equal to its vapor pressure if the vapor behaves like a perfect gas. Speaking in terms not very precise, we may say that the fugacity of a substance is equal to the vapor pressure that the substance $x$ could have if its vapor were a perfect gas. It has been shown in the preceding paper that for a given substance in a given state the fugacity is a definite property of which the numerical value can in most cases be readily determined, and which is well suited to serve as an exact
measure of the escaping tendency.
The unit of fugacity is pressure as you should have guessed by now. Now come to activity. Lewis wanted to express an equivalent concept for solutions so that its unit was same concentration. He defined activity as:
$$ a =\frac{fugacity}{RT} $$
with the following properties:
Besides these we shall use the following definitions of the activity, as per Lewis:
When the activity of a substance is the same in two phases, that substance will not of itself pass from one phase to the other.
When the activity of a substance is greater in one phase than in another, the substance will pass from the one phase to the other, when they are
brought together.
The activity of a perfect gas is equal to its concentration. The activity of the solute in a perfect solution, at constant temperature and pressure, is proportional to its concentration.
We shall see that these statements suffice to define the activity of a substance in any state, and except in unusual cases enable us to calculate its numerical value.