via breeding, you start by catching 2 pokemons that have 31 ivs in stat they have to be in same egg group ofc then give them power items and breed them then get their child to breed it with other pokemon etc
after you get 3x 31 ivs on one pokemon you can start using destiny knot
try searching for breeding guides online I'm sure there are a lot of them that will help you with breeding