I will write under the assumption that $W$ is the wage paid for each unit of labour, $L$.
The blue curve labelled $D$ is the demand curve which shows, for any wage, how much labour employers want to hire. That is, the blue curve shows $L=D(W)$. The reason that $L$ is taken as the dependent variable is that these kinds of figures are usually drawn for perfectly competitive markets. The defining feature of a perfectly competitive market is that the participants take the price (i.e. the wage) as given and choose the quantity to buy or sell accordingly.
The red curve labelled $S1$ is a supply curve that shows, for any wage, how many units of labour are workers willing to supply: $L=S(W)$.
The hypothesis of the perfectly competitive model is that an equilibrium will arise where the quantity that workers supply and the quantity that employers demand are equal. This happens where the supply and demand curves cross, and thus pins down an equilibrium $W$ and $L$.
If something happens to increase the supply of labour (e.g. mass immigration) then the supply curve shifts right (e.g. to S2) reflecting the fact that more $L$ is supplied at any wage. We then get a new equilibrium at the new intersection between $S$ and $D$. The prediction of the model is that this new equilibrium has a lower wage, and a higher quantity of labour employed.
Now, back to the question of "what is the dependent variable?" I have said that from the perspective of each individual (employer or worker), the dependent variable is $L$ because the wage is taken as given. But from the perspective of the market as a whole, economists often take the price, $W$, as the dependent variable.
The way Alfred Marshall (who pioneered this analysis) thought about it is this: each morning some sellers show up at the market with a quantity of goods to sell, while customers show up wanting to buy. If, today, few sellers show up with few items for sale, and if there are many buyers, then the sellers will collectively see an opportunity to set a high price. If, on the other hand, there are many sellers and few buyers then the sellers will compete with each other and the price will be low.
In this story, it is quantity that determines price, and this is why, much to the consternation of new economists, price is on the vertical axis.
But this is just a story, and the convention an accident of history. One can equally tell a consistent story in which sellers see the day's price and then decide whether it is worth going to the market or not (i.e., a story in which quantity is the dependent variable).
Neither of these two perspectives is more right than the other, and, at the the level of the market as a whole, one cannot definitively say in general that price or quantity is the dependent variable.