If the cell phone is running, you can typically reset it by tapping the power button and pressing the menu option to turn it off. If the phone is frozen, removing the battery, reinserting it and then pressing the power button should restart it.
Many smartphones don't provide easy access to the battery, so a frozen screen can make the phone difficult to restart. It is possible to detect freezes and reset a phone on your own, but you might need a manual restart. iPhones and many Android phones restart once the user holds the power button for 10 seconds or longer. This restart generally works even if the phone has crashed.
Users can perform a factory reset as well. On Android phones, you can access this feature by choosing Settings under the application menu and tapping either Privacy or SD and Phone Storage, depending on the version of Android you have. You can perform a factory reset on an iPhone by tapping Settings on the home screen followed by General Settings and then Reset. Performing a factory reset clears user data on the phone, so it's important to back up important information first. Android phones provide an option to clear data on the SD card if the phone supports expandable storage.