This varies with models but google like this:
"How to hard reset a Samsung S5?"
If that fails then check your warranty.
I've got a Samsung S5. A few problems -
1. When online at same place sometimes a blue bar will start about 1/4 of the way across screen and just hang there. A few days later, I can get around the Internet.
2. Once in a while the display will jump around and become pixelated.
3. Now it reboots over and over all the time. I can't even back it up or reset it.