You will need two things:
- An Airport card or built-in Airport on your iMac
- A wireless access point to connect to. This can be either an Airport base station, or another brand 802.11g access point (802.11b access points will also work, but will be a lot slower).
While most new Macs today ship with Airport built-in, the iMac G5's had it as an option. To find out if you have it, go into Applications/Utilities and run "Airport Setup Assistant". You will get an error message if you don't have an airport card installed.
The iMac G5 has a slot for the "Apple Airport Extreme" card. It will not accept other brands of wireless card, nor will it take the older "Apple Airport" (not Extreme) cards - which are no longer made anyway. Just trying to save you from wasting your money on something that won't work.
For your base station, I recommend either the Airport Express or Airport Extreme base station. While the Express has *slightly* less range, it does have a neat "audio-out" feature which lets you pipe your iTunes music wirelessly to another room. Plus, its small enough to fit into the side pocket on a laptop bag and take with you anywhere you go.
When you set it up, follow the instructions that come in the box and be sure to set a password when you go through the Airport Setup Assistant. This should secure your wireless access point against stealing.