1) Modem with Ethernet connector. Can connect two computer using a hub with the modem? Yes and no.
No: You cannot simply connect the modem to two computers with a hub. That won't work.
Yes: You can still use this configuration, but install Sygate Home/Office Network for its proprietary single NIC-mode gateway. After this, both computers can access the Internet (the one with Sygate installed will be the server), but they will not be able to communicate with each other using SMB (i.e., better known as "Network Neighbourhood"), though normal TCP/IP communication is still okay.
2) Modem with USB connector. Not much choice but to connect it directly to one of the computers, and use it as the gateway. (In this case, almost all gateway software, including Sygate, can be used, as you have 2 network connections on the server--the modem, and the NIC.)
3) Modem with Ethernet connector. Get a router (quite cheap nowadays as compared to a few years back), which saves you from always turning one computer on as server.
4) ..... Explore it! There are still many more alternative ways to go...