First of all, a simplified explaination of what IVs are:
*When a pokemon is caught, each stat is randomly distributed a number between 1 and 31 (Or is it 0 and 31? I cant remember lol). This is the IV (Or individual Value) and will never change
*These values determine how high a pokemon's stats are (The higher the better)
The above info makes it self-explanatory that IVs cant be trained. You have probably confused it with IV breeding, which is where someone will breed masses of eggs until a pokemon has decent IVs
An IV battle is done to check a pokemon's IVs, as IV calculators are more reliable when done at a higher level. So people will set a battle to level 100 and get the IVs from their stats (You can do the maths if you're a genius, but there are programs on the internet that will do it for you)