What are those numbers displayed next to people's flags?

If you earn a certain amount of XP, you will "level up," meaning the level associated with the language you're learning will increase. The level displays your effort in learning that language on Duolingo. 

You reach new levels once you accumulate the necessary number of skill points for each level. There are currently 25 levels available for each language, and you can keep leveling up even after completing the tree by practicing and earning more points.