You may want to check exactly which model it is. See, for example, the web page below. The eMac was introduced 2002. The first iMac came 1998.
Anyway, a wireless connection can be arranged in different ways.
If the computer can accept AirPort (or AirPort Extreme) internally, you could buy and install such a card.
Alternatively, all models (even the ones that are not ready for AirPort or AirPort Extreme internally) can connect wirelessly via an external wireless Ethernet bridge (such as Linksys WET610N and Netgear WNCE2001) connected to the Ethernet port. This may have the added advantage that modern wireless security protocols can be used without a problem.
If your wireless router has a built-in Ethernet switch, and the computer is close, you could set up a wired connection (Ethernet cable) instead.