There are a few ways you can remove a jailbreak from your iPhone and therefore restore your device’s integrity. Firstly, if you used an app to initially perform the jailbreak, then it should have the option to unjailbreak the device directly in the app.
If this doesn’t work then, in most cases, rebooting your iPhone will fix a jailbreak by removing it from your device.