>>932869It's a big pain in the ass on anything as or more modern than an iPhone X. In theory there's an unpatchable exploit in the DFU recovery code that you can use to break in forever, in practice if you put it in DFU mode, it deletes the key for the user data partition until you reboot it in normal mode. So on iPX and later, you can jailbreak it but you can't have a passcode or touchID/faceID.
The alternative is a user-mode jailbreak, but you need to have a vulnerable OS version installed, and the security chip won't boot anything that doesn't have a (per-device, per install) signature Apple won't give out unless it's the latest version (at the time you're installing it).
Assuming you meet these criteria, jailbreak the phone/ipad then install AppSync. Then just drop the pirated IPA onto iTunes, and it will install it and it will run so long as the device is jailbroken.
tl;dr: unless you're <= iPhone 7 or <= iOS 13.7 , it's basically not possible for anything beyond security research and testing your own apps.