When are W-bosons emitted? According to this Wikipedia page W-bosons are involved in beta decay. According to Wikipedia, this occurs when a down quark turns into an up quark and also emits a W− boson. When this happens in a neutron, which consists of 2 down quarks and one up quark, one quark switches from down to up and you have a proton instead. An electron is also emitted, and this is the beta decay. 
This brings me to my question, which is as follows:
What makes these quarks change from down to up, i.e. when are the W-bosons emitted?
 A: The reason for this is the so-called weak interaction
(see Wikipedia - Weak interaction - Interaction types.
With very low probabilities (that's why it is named "weak") it causes reactions for example like these:
$$d \to u + W^- \tag{1}$$
$$u \to d + W^+ \tag{2}$$
$$d + W^+ \to u \tag{3}$$
$$u + W^- \to d \tag{4}$$
$$W^- \to e^- + \overline{\nu}_e \tag{5}$$
$$W^+ \to e^+ + \nu_e \tag{6}$$
The $W$ bosons are very heavy. Their rest mass is $80\ \mathrm{GeV}/c^2$.
Therefore they cannot be created as permanently existing particles
from reaction (1) or (2). That would violate the conservation
of energy (including the rest mass energy $mc^2$).
But according to Heisenberg's uncertainty relation
$\Delta E \Delta t \geq \hbar/2$ they are allowed
to exist for $\approx 10^{-25}\ \mathrm{s}$ as virtual particles.
And then they must disappear again through reaction (3), (4), (5) or (6).
Actually this is not even enough time for them to leave the
nucleon (proton or neutron) where they have been created,
and so they get destroyed within that same nucleon.
Therefore a $W$ creating reaction can only happen combined
with a $W$ destroying reaction $\approx 10^{-25}\ \mathrm{s}$ later.
By combining reactions (1) and (5) you get $\beta^-$ decay:
$n \to p + e^- + \overline{\nu}_e$
By combining reactions (2) and (6) you get $\beta^+$ decay:
$p \to n + e^+ + \nu_e$
By combining reactions (1) and (4) you get no change at all,
also by combining (2) and (3).
A: 
This brings me to my question, which is as follows: What makes these quarks change from down to up, i.e. when are the W-bosons emitted?

Physics is the discipline of finding mathematical models for observations, that not only fit the observations (map them) but also predict for new situations successfully.  One says then that the model is validated.
So a basic "axiom" for present day theories of  physics is that a system relaxes to the lowest energy level if no conservation laws are violated.
Thus, in the case discussed, the decays of the quarks, the higher mass quarks go to lower mass quarks until the lowest mass is reached, if conservation laws allow it.It is the weak interaction, mediated by the Z and W which is involved in weak decays. The decay follows the probabilistic nature of quantum mechanics (see my answer to a similar  question)and the conservation laws of the given decay.
A: The cause of the decay is that the weak interaction couples the neutron to a system of  proton + antineutrino + electron. The latter system has a much larger phase space so by statistics the reaction happens in one direction only. The reverse is vanishingly probable. 
