The process of "flashing" an iPhone involves updating the firmware that runs the device. In the case of an iPhone, this will involve installing a newer version of the device's operating system. Newer versions often feature new features as well as increased compatibility with new applications. This can be done by attaching your iPhone to your computer and then running Apple's iTunes device management software.
Plug your iPhone into your computer.
Click on the name of your iPhone.
Click "Check for Updates." If any firmware updates are available for your iPhone, an indication as such will appear on screen. If no updates are available, you will not be able to flash your iPhone at this time.
Click "Download and Install" on the "Updates Available" screen in iTunes. Do not attempt to use your iPhone during this process. Do not unplug your iPhone from your computer during this process. iTunes will download the necessary firmware updates to your computer's hard drive, at which point it will then flash your iPhone. Your existing iPhone firmware will be uninstalled and your new firmware will be put in its place. All of your personal files and data will then be synced back to the device once the flashing has taken place.