This is for anyone who doesnt know what EVs or DVs are.
EV is short for Effort Value, which your pokemon gets after every battle. Your pokemon can have a maximum of 510 EV points total, although only up to 255 in a single stat. When your pokemon beats certain pokemon it gets either 1, 2, or 3 EVs in a certain stat, how many and which stat is decided by which pokemon you beat. By the time your pokemon reaches level 100, every 4 EVs gives an extra point in the stat they are in, so this is an important part of raising your pokemon. There are ways to get EVs faster though.
First, the permanent stat boosting items (Calcium, Carbs, Protein, etc) give 10 EVs each time you use them, though you cant raise your pokemons EVs past 100 in any stat by using these items. Also, the item Macho Brace, while slowing down your pokemon, doubles the amount of EVs it gets after the battle. There is also a rare condition your pokemon can get called the pokerus which doubles the amount of EV points your pokemon recieves after a battle. With macho brace that means 4x the EVs from one battle.
EVs are the reason that pokemon raised purely by rare candy arent as strong. Once you've maxed out your EVs you can rare candy away. You cant see EVs in game, so it's best to keep track from point you start raising your pokemon. If you dont want to do that, raise another pokemon after you've beaten the game, so you can very strictly control how many EVs it gets in which stats, without having to worry about getting past in game challenges. Here are a few pokemon you can battle to get certain EVs.
Caterpie- 1 hp point
Noctowl- 2 hp points
Exploud- 3 hp points
Nidoran(m), goldeen, bellsprout- 1 atk point
Seaking- 2 atk points
Dragonite- 3 atk points
Geodude- 1 def point
Metapod, Kakuna- 2 def points
Aggron- 3 def points
Rattata, pidgey, zubat- 1 spd point
Raticate, Pidgeotto, golbat- 2 spd points
Pidgeot, Raichu- 3 spd points
Oddish, psyduck, ghastly- 1 sp atk point
Gloom, golduck, haunter- 2 sp atk points
Vileplume, Gengar, Beutifly- 3 sp atk points
Tentacool, venonat, drowzee- 1 sp def point
Hypno, Mr mime- 2 sp def points
Ludicolo- 3 sp def points
As you can see, the more points per battle, the harder to find. The fastest (without cheats) way to do it is to equip macho brace and battle 1 point pokemon until you reach close to what you want, then go point by point until you reach your exact goal. Remember, 4 points= 1 stat point at level 100, so there's no need to go to 255 in one stat, max is 252, and also you will get the maximum out of your points by going by multiples of four.
DV stands for Deter Value. Deter values are 6 values (1 per stat) which your pokemon is born with. It's what makes each pokemon different. You cannot see or change your pokemon's DV, however there are calculators online which, if you havent let your pokemon get any EVs, you can punch your pokemon's stats into and it will tell you what the DVs are. DVs also dictate what type and how powerful your pokemon's hidden power is. As far as I know there is no way to change or dictate what your pokemon's DVs will be without cheating. Deter values can be anywhere from 0 to 31.