Step 1: What each of your devices do
A router (wireless or wired)
A network switch
Many times when you have a wireless router supplied by your ISP (internet service provider), it has the modem built in. You can see two routers and a switch in the pictures.
Here is the basics of what each device does:
The modem is the device that sends all of your data to your ISP so that you can communicate on the internet.
The router "routes" between different networks. In the home setup, there will generally be the outside network and your home network (inside network). In addition to routing traffic between two networks, your router will generally have NAT (network address translation) and a firewall. NAT is used to save public IP addresses (all of your home IP addresses are condensed into one public IP address supplied by your ISP). It also provides some level of security. Your firewall decides what traffic can get into your home network.
The switch allows you to expand your wired network by giving you more ethernet ports that you can use. It switches which ports are communicating at one time at a very high speed.
I will not get into how each of these work, as it took me about 1.5 years of very intensive learning to understand networks in the way I do today.