If you mean that you want to try and share an ethernet-connected network wirelessly using the iMac, you go to system preferences -> sharing -> internet. Select the share from as "built-in ethernet" and to computers using "Airport." Click on the options button and specify the options, and then click on the start button inside the window.
There are a number of limitations to this approach, though. If you want to do it frequently, you are much, much better off buying a cheap Wifi router.