Using the wireless capability on your phone is really handy for those times when your 3G connection is spotty or you want a blazing fast connection for downloading and updating new apps. So let's get started with how to set up a wireless connection on your phone.
First access the Settings area. This can be found from any Home screen by pressing the Menu button, or from the Settings icon in the apps tray. Next you'll need to choose the Wireless & networks option from the list. In this next long list of options, find and press the option for Wi-Fi settings. Now for the fun part...
In order to set up a network connection, your device's Wi-Fi must first be enabled. If the Wi-Fi option on this screen is not checked, check it now. Once this setting is enabled, the Add Wi-Fi network option will become available. A list of available Wi-Fi connections will load below the top two options, each showing its security level and signal strength (denoted by the icon on the right with signal bars filled in to show said strength). If there is a lock icon on top of these signal bars, then that particular connection requires a password. To connect to one of these networks, simply press it and, if necessary, enter the password when the window pops up. When connecting to a home network you set up or a public network at a coffee shop, you won't need to fuss with the steps in the following paragraph.
If the connection you're looking for is not in the list, you can add it by scrolling to the bottom of this screen and pressing on Add Wi-Fi network. Here you will need to provide the network SSID and the type of security the router or broadcasting device is using, along with the password, if required. This is only necessary when a device is set to not broadcast its SSID, as an added measure of privacy/security. You can consult your network administrator to find out the necessary details needed for the connection if you are uncertain of them. Once you're done entering your network information, press the Save button at the bottom of the prompt. This will return you to the Wi-Fi settings page, and you should see your device connecting to the selected network immediately.
So now you're connected, and that's awesome, but wait, there's one more hidden option in the Wi-Fi settings area. Press the Menu button from this screen and another hidden menu will pop up. One will Scan for additional networks (you can use this if you have just set up your wireless broadcasting device), and the other will open the Advanced settings. Press Advanced and then Wi-Fi sleep policy. There are other options in this area, but I recommend leaving those at their default settings unless a network administrator suggests otherwise. The sleep policy simply refers to when your device's wireless will remain active. You can adjust this so your Wi-Fi connection will turn off when the screen does, stay active if the device is plugged in, or my favorite: Never. I like to keep my wireless active whether the screen is on, off, upside down, on my desk, next to my bed, or wherever I may set my phone down. But a word to the wise: if you're going to choose Never, make sure you also download something like Wi-Fi status from the Android Market, so you can turn it off when you're not near any wireless networks and conserve some serious battery—leaving it on can and will eat more battery life.