Why router is used in internet infrastructure?

Let suppose you want to connect two computers, you will need 1 cable and one plug on each computer....
Tags: http, webdev, networking