Have iTunes open on your PC or Mac. Do not connect the iPhone yet. Reboot it, by either holding down the power button and swiping on the screen, or holding power & Home. Then, turn on your phone by holding down the power button and Home button. Keep this held down until a 'Connect to iTunes' message appears with a diagram.
Now, connect your iPhone 4S to the PC or Mac with the charging cable. Click Restore, and the process should work. Otherwise, you can actually click update and it will do a similar process.
Refer to this article: If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
if you are having problems doing this.