Okay, every Pokemon can have a maximum of 510 EVs, and 255 EVs in every stat. Every 4 EVs a Pokemon gets will give it 1 point in whatever stat the EVs are for, so because 255 doesn't divide evenly, the maximum number you want to go for is 252 for your Pokemon.
Since you're familiar, every Pokemon has an EV attributed to it, which you gain by defeating them in battle. You can check and see on their pokedex page to see exactly what, or go here.
Typically when you start training for EVs, you use vitamins to get some quick points and count the Pokemon up. You can also use the brace items, which lower your speed, but increase your gains even faster. If you're lucky enough to have something called the Pokerus, then that doubles the amount of EVs you get. While it's very rare to get ingame, it's fairly easy to get by trading online with people.
If you have 252 EVs for a Pokemon's stat, then you've maxed out that Pokemon's stat for them. Of course, there are two other factors you have to worry about. You need A beneficial nature and Individual Values, or IVs. IVs are random numbers given to a Pokemon up to 31, the higher the better. Only a Pokemon with 31 IVs will be able to have that perfect stat you're after. If you search around here, there are ways to breed Pokemon and let them inherit one of those IVs from their parent.