When your pokemon goes up a level, there's that little screen that comes up that says how much each stat increases, right? Well, those are EVs, or Effort Values. (I know I'm stating the obvious...) Now, let's say I think my Torterra is way too slow, and I want to make its Speed go up. Well, to do that, I have to defeat pokemon that will give Speed EVs, like Starly. Starly gives one speed EV when you defeat it. So does Chimchar, however those are not the only ones. There's way too many to list...
But let's switch now. Say I want my Azelf to be a terror with its Sp. Attack. What do I do besides put Nasty Plot on it? I give it Sp. Atk EVs. I go defeat Budew, Piplup, et cetra.
It's actually quite easy once you get the hang of it.
As for when your pokemon's EVs run out, I'm not 100% sure, but I think they never do.
252/252 EVs means that a pokemon has 252 out of 252 possible EVs in either speed/sp. atk/sp. def/etc.
Hope that helped.