You need to put the iPhone in DFU Mode and restore with a computer running iTunes. Allow it to upgrade and restore.
That will wipe out any traces of the jailbreak.
It is possible to simply restore from iTunes but you run the risk of not being able to install tweaks on if you jailbreak again later.
But whatever you do, do NOT Erase All Contents and Settings from the phone. That WILL cause a bootloop on devices running iOS 9.1 or earlier. At that point DFU Mode and restore will be your only option.