connect it to a computer which has itunes installed and restore it
If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
Restore your iPhone, iPad, or iPod to factory settings - Apple Support