Pre-Web Internet
It might surprise you to learn that the Web is a completely different entity than the Internet. The web runs on top of the internet as its technological backbone. "Internet" is used to refer to the decentralized installation of networks that grew out of the government-commissioned ARPANET in the 1970s and 1980s, going public in the 1990s with the emergence of public ISPs (Internet Service Providers).
The idea of an interconnected network of remote computers, able to communicate with each other, originated in the development of electronic computers in the post World War II western world. In 1969, the first message was sent over the ARPANET by student Charley Kline at UCLA to the second node at Stanford. Originally meant to say "login" a system crash caused the last three letters to be omitted, so the message sent simply appeared as "lo."
ARPANET and networks evolved over the next few decades, gaining complexity and ease in communication. A major development was the invention of "packet-switching," which allowed networks to decentralize and distribute the sending of information into "packets" that could streamline out-of-order transmission across precious bandwith and be fully assembled on the receiving end.
The standardization of packet-switching into the TCP/IP protocol laid the groundwork for network cross-compatibility and "internetworking," which connected separate networks into networks-of-networks and allowed for the development of truly global communication.