You must have a wireless network in the area to connect to, and a wireless adapter in your computer. All modern laptops have wireless built in, but only high end desktops have wireless installed and most require a separate USB wireless adapter or a wireless card installed internally. These adapters can be purchased online, at your local computer store, and often times business supply stores (like Staples or Office Depot) will have them for cheap. Wireless G generally costs $20-40, while Wireless N is $40-80. Wireless AC is coming out shortly, and will be very expensive, but runs nearly as fast as wired Ethernet (overkill for most uses).
In windows Vista/7 you will see a wireless icon (looks like the AT&T bars from their old commercials), click on it the icon, select the network you would like to join, and then select the 'connect' button. If there is a password then it will ask you for it after it negotiates with the host router. Lastly a window will pop up asking if it is a work network, a home network, or a public network. As a general rule you should select 'public' as that is the most secure way to join, but if you want to share files with others then you will want to select 'home' or 'business'.
Unsecured networks will show up on the list with a little orange/gold shield warning you that it is unsecured. When connected to an unsecured network ALWAYS select 'public' on the network type otherwise people may be able to see your files and steal personal information.
In windows XP it is normally just as simple, but if things do not work right then it can get annoyingly complicated very quickly.