You can attempt to place the device into Recovery mode to attempt to update the software. This may preserve data.
The other way is placing the device into a mode called Device Firmware Update or DFU mode. This would erase all the data. If you have an iTunes or iCloud backup then you'd be ok to restore that information back to the device after the update is complete. DFU mode is not a "public" solution. You can perform a web search for that information.
Recovery Mode:
https://support.apple.com/en-us/HT201263
If you cannot successfully update or restore the device, you may have better luck contacting support or locating your nearest Apple service provider by going to locate.apple.com