You have several options.
Hardware router: it handles the external connections, and your computers plug into the router and are assigned internal IP addresses on an internal subnet, and communicate that way. The router handles all. Either computer can be online while the other is off.
Hub/Switch and software router: such as that built into OSX/freely available to OS9/etc. Probably cheaper, but whichever machine handles the routing must be on in order for the other to use the Internet.
Second ethernet card in a machine/software router: same as above, sans the hub, basically, using an additional ethernet interface. Again, the router machine must be on.
The best for your situation? Probably the hardware router. It won't be the cheapest though.
I can't give you pricing information, but any old netgear or linksys router will work. Some are better than others. I use software routers, so I don't know a great deal about specific models - perhaps someone else could help you out there. Get them at any computer store, really.
Once you decide on one, tell us here, we'll tell you if it's appropriate, then how to set it up.