Where does $W$ boson mass come from in neutron decay? Here's a diagram of neutron decay.

Up and down quarks have rest masses of 2-4 MeV. The $W$ boson has a rest mass of 80 GeV.
Where has this extra mass come from?
 A: You have drawn a Feynman diagram.
Feynman diagrams are iconic shorthand for integrals over the variables of the problem. The calculation gives the probability for the reaction to happen, in this case the decay  of a neutron .
The observables are the four vectors of the initial (neutron) and final particles. The integral is over the variables .
Here is a simpler labeled diagram


The Feynman diagram for the Coulomb interaction (electric force), along with the parts of the Feynman integral they correspond too. Every part of this is really nasty. For example, that "g" is actually 16 numbers.

This is the expression that has to be integrated over the limits of the  variables.

The electric force (what physicists call the “Coulomb force” to look smart) is mediated by photons.  That is to say, particles with charge push or pull on each other using photons.  The diagram above is the “first order Feynman diagram” for two electrons repelling each other.  The probability amplitude of two electrons with momentum p and k pushing off of each other and flying off again with momentum q and l is given by:



If you’re wondering which particles are virtual and which are real: virtual particles are the ones stuck inside the diagram and real particles are the ones going in and coming out (they might go on to be detected somewhere).

The incoming lines represent real particles, and also the outgoing lines. The line in between represents the functions under the integral. This line has to carry the charge and quantum numbers that conservation laws impose. In addition there exists a function under the integral, called a propagator, which has in the denominator the mass of the named particle.  In the case above it is the photon's zero mass. 
Under the integral  the four vector of this "photon" line  cannot have zero mass because of the spread of the variables of integration, so it is off mass shell and called a virtual photon.
In your diagram for neutron decay the corresponding denominator is 
((p-q)^2-m_W^2). The large mass is crucial and represents together with the coupling constant, the "weakness" of the interaction. That is why the internal line is identified with the W. It has all the quantum numbers but a variable mass of the four vector it represents. It is called virtual for this reason.
The W boson mass comes within the integral represented by the diagram, in the denominator of the propagator. The line represents an off mass shell virtual W.
A: It can be stated this way:
In this particular diagram, the W boson is in a state named off-shell i.e. we say that this boson is virtual.
Virtual particles are allowed to have any mass value. They can't although violate charge conservation at the vertex.
This 80 GeV mass of the W boson, is for a real W boson, which is on the on-shell state.
The real particles are the ones we "see" (detect). The quarks up and down, the electron and the antineutrino are the real particles in that diagram. Got it?
So everytime you see a reaction: $$ d \rightarrow u + e + \bar{\nu_{e}} $$
You know that the intermediate vector boson in the middle of  the diagram, between the 2 vertices is in a state called "off-shell", so it can aparently violate mass-energy conservation, but it comes from the fact that quantincally there is a uncertainty associated with the energy and the time:
$$ \Delta E. \Delta t = \frac{h}{4\pi}$$
so 
$$ \Delta t = \frac{h}{4\pi mc^{2}} $$
where i choose $E=mc^{2}$, assuming that the W will be approximately at rest that is, in the limit of low momentum transfer.
So, you can see that if in a very small amount of time you can have a massive particle "existing".
