It doesn't matter which make of smartphone you have. At some point, it's going to stop responding, and leave you with an irritating phone that you'll be tempted to throw at the ground. Instead what you should do is learn the keys that will reboot your phone even from a locked state.
The most obvious first step for any frozen smartphone is to simply hold the power button in for a few seconds to see if that allows for a more graceful shutdown procedure. If that doesn't work, if your phone has a removable battery, you can always yank that out to stop the freeze in its tracks. But what if you're using one of many phones that has a sealed battery?
Hold down the power and home buttons for around five seconds, and any iOS device should reboot. You'll know it's done so when the Apple logo comes back up onscreen.
Windows Phone 7/8
Hold down the power and volume down button for around ten seconds, and a frozen Windows Phone should reboot.
Hold down the right Alt key, then press and hold the left Shift key and Del. This should reboot the phone.
Most locked Android phones should respond to a combination of holding the power button and volume down (or in some cases up) keys for around ten seconds, but this does depend on the exact ROM settings of the phone itself. Volume plus Power usually initiates factory recovery on reboot, so remember to stop holding those buttons once it's started the reboot process.
Lifehacker 101 is a weekly feature covering fundamental techniques that Lifehacker constantly refers to, explaining them step-by-step. Hey, we were all newbies once, right?