It depends. Each motherboard will have a fixed number of PCIe lanes, which are allocated to various sockets. In an ideal world, all the sockets would have their own dedicated lanes. However, there are rarely enough of these lanes, and so the board manufacturers have to make choices. One approach is simply to put sockets onto the board which just match the number of lanes available. An alternate approach, to provide flexibility for the differing needs of the purchasers, is to have a subset of the lanes be connected to more than one socket. Plugging a device into one of the sockets "takes over" those shared lanes, and the other socket becomes non-functional (whilst the other socket is occupied).
For certain subsystems on a motherboard, the bandwidth provided by lanes connected to them will be shared between multiple connected devices -- this happens with USB, for example. For this scenario, it matters that normally any one device is unlikely to make use of the bandwidth all of the time (infrequent transient peaks of usage), and therefore sharing it out makes sense.