Identifying iPhone Models:
http://support.apple.com/kb/HT3939
Use the model number listed on the back of your iPhone to determine the iPhone model. I don't understand how someone can own an iPhone and not know what kind it is before buying it, but that's a different story altogether I guess.
If your iPhone does not have a model number or characteristics consistent with those in the support article I linked to above, it may be a knock-off. Otherwise, try these. Hopefully one method will work: (Note that steps 2 and 3 will erase all of your data and settings, but it can all be synced back if the content is in your iTunes library/computer or you have a backup of your device. In iTunes, go to Edit > Preferences > Devices to see a list of backups of iPhones, iPods, or iPads.)
Step 1. Hard reset/reboot: Press and hold both the home button and sleep/wake button until it restarts. Keep the buttons held until it reboots. None of the data or settings will be erased. If this doesn't work/solve the problem, proceed to step 2.
Step 2. Restore: Restore through iTunes by attaching your iPhone to your computer via the USB cable, opening iTunes, selecting your iPhone in the left pane, then selecting the restore option in the right pane. Remember to "restore from the backup of" first, and then if the problem persists, then "set up as a new iPhone." If you cannot perform a restore or your computer doesn't recognize your iPhone, then procedd to step 3.
Step 3. Recovery: Force your iPhone into recovery mode and restore from there. To do this, turn it off (or leave it in the frozen state and try it from there). Then, press and hold the home button. Keeping it held, plug your iPhone into iTunes via the USB cable. Keep holding down the home button until the screen showing a USB cable and an iTunes icon appears. Then, iTunes will recognize your iPhone, and you can do a restore.
Step 4. If none of the above has worked, then the only thing you can do is to take it into an Apple Store to get it replaced. If your iPhone is still under warranty they will replace it with no charge. You can also mail it in to Apple.