So for example, assuming you're starting out with nothing but 2 IV safari parents (though you can catch a lot and some will probably come out with 3 IVs) and you want a physical sweeper and the hidden ability for it. I would grab 2 with different IVs (say male with HP/Atk and female with SpD/Spe) and breed them, have one hold the destiny knot and the other hold a power item (optionally if you have a parent with the right nature you can start everstone now to save it unless you can re-introduce it later, which is what ditto is good for). Your goal is to get 3 IV parents from there, say a male with HP/Atk/Spe and a female with Hp/SpD/Spe. You'll then want to switch it up and swap out one of the parents for one with Def, have it hold the power item for def (belt I think), the other hold destiny knot, and breed them until you can get a 3-4 IV parent; for this example, you leave in the male and introduced a different female with HP/Def, your goal now is to get a male with HP/Atk/Def and ideally Spe if you can.
But regardless, you will now want to take that new male parent once you get it (HP/Atk/Def) and have it hold destiny knot, then breed it with the original female you had (HP/SpD/Spe) with everstone and what you're aiming for now (since your 5 IVs are accounted for) is a progressing chain until you end up with 4 or 5 IV parents; say your next batch of eggs gives you a new male with HP/Atk/SpD/Spe, you don't want to replace your current male as you'll lose Def. However if you get a male with HP/Atk/Def/Spe, then you swap it in over your current male as it now has 1 additional IV Destiny Knot will check against. Same for the female, you'd reject say a HP/Atk/Def/Spe one since the male has no SpD, but you would keep a HP/Def/SpD/Spe (you would also reject any without the hidden ability as you MUST have it, otherwise it you swap it for a female without it, then you'll be stuck with just whatever normal ones it has). But really from here, it's just breeding enough so you'll replace your 3 IV parents with 4 IV parents, and from there should be pretty quick to get that 5 IV egg with the IVs you want passed down. Of course, you could get really lucky at the 3 IV stage and end up with the egg you want, but your odds increase as you replace your 3 IV parents with 4 IV parents.
This is probably why it helps to trade or otherwise get a "spitback" parent if you can, ie a rejected one from someone because it doesn't have the right IVs they want. But since these are 3-5 IV parents (ideally male in the egg group you want), it cuts down on the time you need to expend breeding quite a bit. Male parents (unless you're going for egg moves) in this sense are more valuable since species is determined by the female, so if you have a 4-5 IV male parent, you can breed with anything in its egg group while only needing to get the right female and ability (nature also I suppose if the male one isn't one you want).