That is one way.
If you have a computer with two built-in ethernet ports, you can plug the modem into one, plug the second computer into the other ethernet port, and connect to the internet through the first computer. Because nearly all motherboards include an ethernet port, you can buy a network card and plug the second computer into it.
The big problem with these approaches is that the first computer needs to be on.