Here's our step by step tutorial on how to hard reset a Samsung Galaxy S5. Please note that a hard reset should only be used when every other attempt to reset your phone has failed. Be sure to backup all of your personal data before proceeding.
Turn off your device, remove the battery, and wait a minute before reinserting it. Then, simultaneously press the [Power] + [Home] + [Volume Up] keys to boot your phone. Wait until the Recovery booting screen appears before releasing the keys:
Use the Volume keys to move to the Wipe data factory reset option and confirm your selection using the Power button:
The smartphone shall reboot; wait for the reset procedure to unfold.
N.B. This method also applies to other models of the Galaxy S smartphone line-up.