Using only a Hub, one computer has to run some internet sharing software, like Windows ICS, for both computers to access the internet using 1 IP address. This is the easiest way, and you don't even need a hub. Or, you could pay for a second IP address from your cable provider, then I think a hub would work.
But no, you can't just plug your cable modem into a hub, then plug the computers into the hub and expect it to work. A hub is a dumb device and makes no forwarding decisions.