A stat's modifier is set at 7 when you start a battle. If the opponent uses a stat-lowering move (such as Growl), the modifier goes down by 1. If the user uses a stat-raising move (such as Meditate), the modifier goes up by 1. Moves such as Swords Dance and Screech move the modifier by two places (so one Swords Dance raises the Attack modifier from 7 to 9, for example). The limits for the modifier are 1 to 13, inclusive. Thus, through the Mew glitch, we can have a Pokemon at any level from 1 to 13.
Pokemon earn experience at four different rates. Some Pokemon only require about a million experience points to reach level 100, while others need more. There are four experience rates. Those with a specific experience rate (probably the one that requires the most; it's the one Mew has) will actually have negative experience points at level 1. Because the game engine itself doesn't recognize the existence of negative numbers, the experience points are instead read as a very large number (enough to get a Pokemon of that experience rate to level 245, apparently). Thus, if you use this level 1 Pokemon in battle, it will instantly go to level 100 after gaining experience, so long as the experience gained from the battle isn't enough to instead make it go to level 2. It won't go any higher than level 100, since (as we know from testing with the Missingno. glitch) L100+ Pokemon immediately return to level 100 upon gaining experience.
However, I wouldn't be surprised if depositing the level 1 Mew in the PC would recalculate the level based on the experience points and actually make it level 245 or so.