A network connects two or more computers and allows them to share resources. There are two main types: local area networks (LANs) which connect computers in a small area like a building, and wide area networks (WANs) which connect computers over a large geographical area. Networks use hardware like hubs, routers, and gateways to transmit data via physical cables or wireless media using protocols like Ethernet and TCP/IP. They are categorized by their topology, protocols, and architecture.