At the end of Pirkei Avot 5, we have a statement (of either Ben Hei Hei or R. Yehuda ben Tema --- I have two siddurim with slightly different texts):
He used to say: at five years of age, the study of Scripture; at ten, the study of Mishnah, at thirteen, the mitzvot; at fifteen, the study of Gemara [...]
However, Ben Hei Hei and R. Yehuda are tannaim, and Pirkei Avot is itself part of the Mishnah, so the references to "Mishnah" and "Gemara" seem anachronistic. What do they refer to, and what relationship does itdo they bear to the Mishnah and the Gemara that we have today?