EV training is quite complex, but the rewards of EV training a pokemon are great. With EV training you can choose to increase the rate at which a certain stat gets points.
The concept is, when a pokemon faints another pokemon, it gains exp points, and EV points. The EV points depends on the pokemon that gives experience.
So, say you battled and killed a wild magikarp. Magikarp gives 1 EV point towards your speed stat. So the pokemon that gains the experience from the fainted pokemon (Yes you can use Exp. share to EV train more than one pokemon at a time) gets 1 EV speed point. 1 EV point wont do anything; however, if you battled, say, 4 geodudes, the pokemon that gains experience from all of them will gain 1 stat point towards the desired stat. Every 4 EV points = 1 stat point. So let’s say your pokemon fainted 4 magikarps without growing a level before those 4 are fainted, it would gain 1 speed point towards it stat.
A single stat can hold a max of 255 EVs per stat. further more, a pokemon can only receive 510 EV before EVs have no effect on it anymore. Therefore, you should plan out how you distribute EVs to your pokemon to get the desired stat rise you need.
Battling 255 magikarps would become very tiring, so instead you can give it some vitamins (IRON, to be precise) irons will give 10 evs to the stat that it says it will raise. there is a catch though. you can only give a pokemon a max of 10 vitamins per stat. therefore, if you wanted to give yer, say, Empoleon max defense, you could give it 10 irons to get 100 defense EVs, but the other 155 EVs will need to come from battling other pokemon. You could also fight stronger pokemon for example a machop gives 1 EV point towards attack and a machoke gives you 2 EV points towards attack. So instead of fighting 255 machops you could fight 128 Machokes
EV training, along with selecting a good nature for your pokemon, can make give your pokemon a huge stat increase. Like this you could become practically an unbeatable trainer.
The stat bonuses won’t show right away if they are in a low level. They will show up as the Pokemon gets to level 100. By the time it is at level 100 it would have all the stat bonuses you made it earn.