I see you are asking about EVs.
Every time you gain Exp. points from defeating a Pokemon, you also gain Effort Points. There are six types of Effort Points (HP, Attack, Sp. Attack, Defense, Speed, Sp.Defense) and what Pokemon you defeat decides how you get the EVs. Items such as Macho Brace and the Pokerus can double the growth rate of EVs. For every 4 EV points you get in a stat, you get a boosted point in that stat. Go to serebii.net for more about this.