First you need to know that pci-e works in lanes so even a device designed to run on 16 will work on 1/4/8 just with less bandwidth.
Intel boards get most of the PCI-E lanes from the cpu now. It only has so many.
So say your cpu has only 16 lanes, you want to have 2 x16 slots. You have to split it 8 to each. This is done with an electronic switch that takes the last 8 lanes from the first slot and makes it into the first 8 on the second slot.
Take that a step further and you get 8 + 4 + 4. The electric switch takes the last 8 from the first slot and sends it to the last 2 slots if needed
This is a VERY simple and cheap solution. A cheaper option they used to use was actual jumpers or a card that would route the lanes to the lower slot as well.
Now higher end cpus have MORE lanes and can run 16 + 16 or 8+8+8+8
An option for middle end setups(limited lanes) is a device called a PCI-E switch/bridge(not the same as above). it allows you to turn lets say 16 lanes into 32. This allows a board with 2 x16 slots from a cpu that only has 16 lanes.
The biggest downside to this option is cost and board space to install this device.
This is the same setup used for most multi gpu video cards.
You also have MORE lanes on the chipset of the board, but these tend to be used for things like LAN/Sound/ect. Some boards HAVE used them for an x4 video card slot
I hope this helps you understand it a bit.
I am adding some images to show you some of the above mentioned items.
Jumpers to make a lower pci-e slot take the last 8 lanes from the upper slot.
Flipping this card allows you to select single card(pci-e x16) or dual (pci-e x8 x 2)
NF200. A very popular pci-e bridge chip used to allow x16 cpus to feed 2 x 16 cards.