Chapter 5, Mishnah 2: There were ten generations from Adam to Noach. This is to teach us the extent of G-d's tolerance, for all these generations angered Him until He brought upon them the waters of the Flood. There were ten generations from Noach to Avrohom. This is to teach us the extent of G-d's tolerance, for all these generations angered Him until Avrohom came and reaped the reward for them all.
The Simple Explanation
The Mishnah tells us of two groups, each spanning ten generations. First, it tells us of the ten generations beginning with Adam; this was the very first generation in history. The tenth generation was that of Noach. The reason for telling us of these generations is to demonstrate how great Hashem's patience is. Even though each of these generations angered G-d, He allowed ten such generations to pass until acting. Only after many hundreds of years did Hashem bring the waters of the Flood upon them.
This teaches us a valuable lesson. Throughout history, G-d has allowed many nations to thrive. This is so, although they mistreated His children, the Jews. From this Mishnah, we understand it is due to His great tolerance.
The second group was the ten generations from Noach until Avraham. Regarding those generations, we say that Avrohom reaped the reward for all of them. Avrohom single-handedly performed all the goodness and kindness demanded of the nine generations preceding him. Hence, he received all the rewards they would have been entitled to had they behaved according to Hashem's wishes. This is in keeping with the teaching of the Talmud that "each person is born with two portions; one in Gan Eden and the other in Gehinnom – Purgatory. If one merits, he receives his portion and that of his fellow in Gan Eden. Otherwise, he receives his portion and that of his friend in Gehinnom."
1. This explanation is based on that given by Rabbi Ovadiah of Bartenura, who wrote one of the classic commentaries of the Mishnah.
2. See Talmud Chagigah 15, b.