A network is the interconnection of two or more computers that allows them to share resources. There are three main types of networks: local area networks (LANs), which connect computers within a building; wide area networks (WANs), which span larger geographical areas like cities or states; and metropolitan area networks (MANs), which are between the size of a LAN and WAN covering a metropolitan region. LANs have low costs but limited distance and speed, while WANs can share resources over large areas but are more expensive to set up and require firewall security. MANs interconnect users and computers within a metropolitan area, larger than a LAN but smaller than a WAN.