Ev trained.
Just say, I had two Porygon-Zs.
One called Pz
the other Px.
I ev'd the Pz in 252 Sp.Atk
and Px in 0 Sp.Atk.
Pz now has 405 Sp.Atk at level 100,
and Px has 306.
You get it? It raises specific stats of a pokemon.
By battling other pokemon, you can raise your own.