Like any electronic device, the iPhone occasionally has mechanical hiccups, resulting in what has come to be known as "The Black Screen of Death." Sometimes a downloaded app malfunctions and jams the phone's processing power, and sometimes the phone undergoes physical damage, such as a drop, a splash of water or severe temperature exposure. If this happens, there are several things you can do to try to remedy it.
More often than you might think, iPhone users simply forget to charge their devices. When the battery dies completely, the screen goes blank, and no amount of button-clicking will turn it back on. Before you jump to conclusions that your phone is malfunctioning, plug it into a charger and make sure that it has enough juice to turn on. Make sure to try plugging it into more than one charger if the first one doesn't work: You may have a problem with your charger instead of your phone.
Occasionally, the iPhone can't handle the volume of commands it needs to perform, and it freezes. This tends to happen with apps that require a lot of memory or processing power, such as the camera. If your screen suddenly freezes and goes black in one of these cases, you can generally fix it by resetting your phone. To do this, press down on the "Home" button and the "Sleep" button at the same time for about 10 to 15 seconds. The "Home" button is at the bottom of the display screen; the "Sleep" button is on the right side of the top of the phone.
If a reset doesn't work, take your iPhone into an Apple store to let the Genius Bar take a look at it. The Genius Bar is a set of Apple employees that answer questions about the technical details of the products and help customers with technical support. When you bring your blank iPhone to them, explain how the problem started and any extenuating circumstances, such as dropping it in water or leaving it in the sun. They should be able to either fix it or replace it, though the cost won't be covered by your warranty if you are responsible for its demise.
Some iPhone users try to "jailbreak," or hack, their devices in order to skirt the restrictions imposed by the manufacturers. This allows you to customize your phone with different themes, upload software from companies other than Apple and use a different carrier. However, while it is technically legal, it voids your warranty with Apple, so if you make a mistake or receive faulty jailbreaking instructions and wind up with a black screen, you cannot have the Genius Bar fix it for free. Some jailbreaking forums may be able to help you detect and fix your specific problem, but the phone is often irreparable.