Editors' note: This post is part of an ongoing series. Here are the links to part 2 and part 3. This part was updated on February 13, 2013, to add information about hubs, switches, and the new 802.11ad Wi-Fi standard.
Note: Technically, you can skip a router and connect two computers together using one network cable to form a network of two. However, this requires manually configuring the IP addresses, or using a special crossover cable, for the connection to work. You don't really want to do that.
Rule of thumb: The speed of a network connection is determined by the slowest speed of any party involved. For example, in order to have a wired Gigabit Ethernet connection between two computers, both computers, the router they are connected to, and the cables used to link them together all need to support Gigabit Ethernet. If you plug a Gigabit Ethernet device and an Ethernet device to a router, the connection between the two will cap at the speed of Ethernet, which is 100Mbps.
Note: Since most Internet connections are slower than 100Mbps (a fast cable connection, for example, is about 50Mbps down and about 6Mbps up), an Ethernet-rated WAN port is sufficient in most cases. However, Gigabit Ethernet routers tend to also come with a Gigabit WAN port. That said, switching from an Ethernet router to a Gigabit Ethernet router generally doesn't translate into faster Internet speeds; it usually just helps devices within your local network (LAN) to connect to one another faster.
Note: Technically, you can skip an access point and make two Wi-Fi clients connect directly to each other, in the Ad hoc mode. However, similar to the case of the crossover network cable, this is rather complicated and inefficient, and is far less used than the Infrastructure mode.
Note: In order to have a Wi-Fi connection, both the access point (router) and the client need to operate on the same band, either 2.4GHz or 5GHz. For example, a 2.4GHz client, such as an iPhone 4, won't be able to connect to a 5GHz access point. In case a client supports both bands, it will only use one of the bands to connect to an access point, and when applicable it tends to "prefer" the 5GHz band to the 2.4GHz band, for better performance.