Aside from certain Pokémon (like legendaries in 6th gen or certain event Pokémon), all IVs are completely randomized. The only way to have any control over IVs is via breeding using an item called Destiny Knot. If one of the parent Pokémon is holding a Destiny Knot, every child it has is guaranteed to have 5 of the same IVs its parents. Which means it can take the ATK, DEF, and SpATK from mother and then the HP and SPD from the father. This leaves the last IV, in this case SpDEF, to be completely randomized. Kinda tricky but not that bad. Other than breeding with a Destiny Knot, a select few event Pokémon, and 6th gen legendaries all Pokémon will have randomized IVs.