Apple does have apply some restrictions on what you can run on its smartphones. But you can always hack your iPhone to run custom software. Hacking Jules has shared a video that demonstrates how you can side-load an app through Xcode and use an emulator to run Windows XP on an iPhone 7.
As you can see, these smart gadgets were not designed to run Windows. But it’s nice to know there is a way to pull it off.