If your wireless router is set up, all you need to do is connect to it by clicking on the airport logo on the top bar, and selecting the SSID.
If your router requires a WEP code, then enter it when prompted. Remember if its a 128bit code, remember to select which kind of code it is from the drop down menu above the password entry form which Airport will prompt you for.
If it is a MAC code reliant router, then get into router admin from another unit and add your iMac's MAC code. You can find this by pressing: Apple Menu (top left of the screen) - About this Mac - More Info - Network (in the side bar of System Profiler)
It is at the bottom
Hope this helps
Alex