If you don't have a router to assign ip addresses by DHCP, you can directly connect two computers by an ethernet cable in something called an "ad hoc" network. You have to manually set IPv4 addresses for each machine, and if even one of them has gigabit that's auto-MDIX so you don't even need a crossover cable. But you do need ethernet ports on both.
And yep, a modem is definitely not ethernet. The ethernet cable won't even plug in.
There's also USB or Firewire networking, but those require special cables.