To reset your iPhone, hold down the Sleep/Wake button along with the Home button, simultaneously. Keep holding them for at least 10 seconds or until the Apple logo appears. If your iPhone seems frozen and isn't responding to your requests to please start working again, it could be it needs to be charged. You can either use your iPhone AC adaptor or the USB port on your computer. Don't use the USB port on your keyboard, as it doesn't provide enough power to charge the iPhone.
Sometimes if you update your software it resolves problems with the iPhone. Ascertain that you have the latest version of iTunes, then connect your iPhone, and look in the left column under Devices. Click on your iPhone, and then click "Check for Update" in the Summary tab. From there, you can just follow the directions they give you. If you're still having problems, you can ask fellow iPhone users for tips, consult an iPhone expert, or bring your iPhone to an Apple retail store.