There is a most interesting text by HPB that explains exactly what a Mahatma is.
The text is entitled “MAHATMAS AND CHELAS”.
We have published in our websites, with the subtitle “A Short Text Clarifying Fundamental Questions”.
Here is an excerpt:
“A MAHATMA is a personage, who, by special training and education, has evolved those higher faculties and has attained that spiritual knowledge, which ordinary humanity will acquire after passing through numberless series of reincarnations during the process of cosmic evolution, provided, of course, that they do not go, in the meanwhile, against the purposes of Nature and thus bring on their own annihilation.
This process of the self-evolution of the MAHATMA extends over a number of “incarnations” although, comparatively speaking, they are very few. Now, what is it that incarnates?
The occult doctrine, so far as it is given out, shows that the first three principles  die more or less with what is called the physical death. The fourth principle, together with the lower portions of the fifth, in which reside the animal propensities, has Kama Loka for its abode, where it suffers the throes of disintegration in proportion to the intensity of those lower desires; while it is the higher Manas, the pure man, which is associated with the sixth and the seventh principles , that goes into Devachan to enjoy there the effects of its good Karma, and then to be reincarnated as a higher individuality.
Now, an entity, that is passing through the occult training in its successive births, gradually has less and less (in each incarnation) of that lower Manas until there arrives a time when its whole Manas, being of an entirely elevated character, is centered in the higher individuality, when such a person may be said to have become a MAHATMA.”
The full text can be read in www.esoteric-philosophy.com/2011/06/mahatmas-and-chelas.html .