The history of modern computer networking technology goes back to 1969, when ARPANET (Advanced Research Projects Agency Network) became the first connected computer network. It implemented the TCP/IP protocol suite, which later became the Internet. ARPANET was developed by the Advanced Research Projects Agency (ARPA), a subset of the US Department of Defense. Why did the DoD need to develop networked computers? The Cold War, of course! The goal of ARPANET was to keep lines of communication open if the USA and the USSR decided to exchange nuclear devices.
ARPANET revolutionized communications by using packet-switching instead of direct connections. Data that is communicated through a packet-switching system is formatted into packets with an address of the destination machine, and then sent onto the network and picked up by the next machine. The address in the protocol tells the machine where to send the packet. This way, the information will reach its intended destination, even if there isn't a direct connection between the two machines.
While it changed the need for there to be direct connections between machines to communicate, the ARPANET system still relied on phone lines. It was originally a four-node network between university computers at Stanford, the University of Utah, UCLA, and UCSB, but expanded to 40 machines in 1972.