Mass Defect...cause and origin? What makes it occur? How do the protons and nucleus know that they have to lose mass to produce energy...?
And is the mass of a compressed Spring more than an uncompressed one??
does a body which has a greater energy has more mass than the one which has a less energy?
 A: A compressed (or stretched) spring conceptually has an greater mass than does a spring in its minimum potential energy state.Similarly, a hot piece of iron conceptually has a greater mass than does a colder piece of iron with the same number of iron atoms as the hot piece of iron.  I wrote "conceptually" in the above because the change in mass is unmeasurably small.
The change in mass is measurable when it comes to atomic nuclei. This change in mass is the basis for fission power (traditional nuclear reactors and the bombs that ended WWII) and fusion power (e.g., the Tsar Bomba, fusion reactors such as ITER, and our Sun).
Consider the processes by which a star converts four protons into an alpha particle. The alpha particle that results from these processes has a mass of 3.9726 protons. What happened to the 4-3.9726=0.0274 proton masses? (Answer: It turned into energy. That 0.0274 proton mass is equivalent to 25.7 MeV. That's the source of energy that makes the Sun shine.) The alpha particle is in a reduced energy state compared to that of the four individual protons.
Mass and energy are distinct concepts classical physics. This is no longer true in relativity theory and in high energy particle physics. The distinction becomes blurred; mass and energy are flip sides of the same coin. Mass is just one of a number of forms of energy. Mass is bound energy.

So what makes this occur? It's the nuclear force, aka the residual strong force. Physicists have known since early in the 20th century that a rather powerful interaction was needed to bind together the protons and neutrons that form the nucleus of an atom. Electromagnetism is not the answer; it would make the nucleus blow apart. Whatever binds the nucleus together had to be much stronger than electromagnetism. It turns out that the nuclear force that binds the protons and neutrons that comprise an atomic nucleus is a residual effect of the strong force that binds the quarks that comprise individual protons and neutrons (but that wasn't known until the 1960s).

With regard to your first second question, "How do the protons and nucleus know that they have to lose mass to produce energy?", it's best not to go there. Protons and neutrons don't know anything. They obey the laws of physics. Why? That's philosophy. Philosophy questions are not appreciated at this site.
With regard to your first question, "Why does it occur?", it's best to translate that to "What makes it occur?" This is an answerable question. The answer lies in the laws of physics. Physicists have developed detailed models of the forces that hold a nucleus together. "Why" questions are the purview of metaphysics (aka philosophy). Translating a "Why" question into a "What" question makes the question scientific.
A: 
"How do the protons and nucleus know that they have to lose mass to produce energy...?"

Notwithstanding the comments that this is a silly philosophy question, I think it is a good question for precisely that reason: you know that protons cannot "know" things and therefore we must find an explanation not involving "knowledge". It sounds as though you're thinking something along the lines of everything's getting to the end of the reaction and saying "hey, we need to have less mass now", which of course you know is preposterous. So maybe it helps to think of fusion / fission as a process: he protons are in constant contact with the process, and it is their loss of energy that "drives" the process (I use the quotes because the energy loss is necessary, but not sufficient, to make the process happen). At the risk of being too colloquial, you can almost say the protons use a small piece of themselves up in completing the reaction. 
(Rest) Mass is simply the property that something has if it has a nonzero energy content as measured from a frame that the particle is at rest relative to. As in the other answers, this notion is neatly expressed in the equation (for the "four-momentum's Minkowski norm"(see footnote)) $E^2 - p^2\, c^2 = m^2\,c^4$: if you are in a rest frame relative to a particle, then its momentum $p$ is nought and it has an energy content if and only if $m\neq0$. So yes, mass really does measure an energy content. So after having taken part in the process, the protons have a smaller energy content than before as measured from a relatively stationary frame, so that they have less rest mass. 
But not only does the property rest mass measure energy. It also gives rise to the property of inertia, or resistance of state of motion change to external force, i.e. to the proportionality constant $m$ in Newton's second law. For instance, if we confine a quantity of light inside a perfect, lossless resonant cavity, we can show that the system's inertia increases by an amount $E/c^2$ when we confine the light, where $E$ is the light's energy. I talk about the thought experiment that shows this in my answer here. Indeed, in the same way, most of the mass in your body is owing to the massless, but confined, gluons in the nucleusses of your body's atoms.
For accuracy, I should say that particle physics thinks of many conversions as noncontinuous events: simply branches in a Feynman diagram and does not try to penetrate the "process" or think of it as a continuous evolution as I have implied. But the key idea is that everything is connected and interacting, with the transfer of energy. For example, the fusion reaction of four protons to yield helium in the Sun is thought of as three discrete events:

The proposal of this process as the source of energy in stars led to the award of the 1967 Nobel prize to Hans Bethe
Footnote: I appreciate this phrase is likely to be jargon to you at this stage -  I'm not trying to be a bothersome git- I use the phrase because you might like to use it as a phrase to google on as your understanding builds and you want to know where it comes from. See here. 
A: This is a case in which anthropomorphizing language like "How do the protons and nucleus know [...]" is not merely unhelpful but positively harmful. I'd recommend not doing it even in the privacy of your own thoughts.

Understand that the mass defect is a feature of the system (the nucleus) as a whole, not of any one part of it.
The system has the property of having less total energy than the component parts would have if they were free---something that is true of all bound systems and is in fact what it means for the system to be bound. 
Einstein tells us that mass is a kind of energy, so less total energy (in the nuclear rest frame) is equivalent to saying less total mass. The difference is called the "mass defect".
People will occasionally divide the mass defect up by the number of nucleons and talk about defect per nucleon but it still does not mean that protons have some mechanism to simply ignore some of their mass: the system is lighter, but the components.1

There is nothing special about nuclear systems in this regard. The solar system treated as a whole is less massive (by a unmeasurably small fraction) than the total mass of the sun, the planets, the moons and all the smaller hangers-on taken separately  simply because the system has less total energy in its current configuration.

1 Nuclear systems are a little tricky here because the binding force (the residual strong attraction) actually alters the nature of the bound proton a bit---it's form factors change---but it is still useful to talk of these states as "protons" and "neutrons".
A: (The other answers are fine, but I wanted to answer this question for myself once and for all as well.)

Why does it occur?

The mass defect results from the energy conservation in special relativity: in some process the whole energy including the rest energy is conserved, where the rest energy is
$$E=m_0 c^2 ~.$$ 
Now, usually you write the energy conservation -- for example in a billiard ball collision -- like this:
$$ E_{kin} = E'_{kin}+ \text{other energies}~,$$
where the prime indicates a quantity after the process. Other energies means that in the process other energies besides the kinetic energies take part in the process. If you collide the two billiard balls for example, then you would have a $+\Delta E_{Heat}$ on the right side since a bit of kinetic energy is lost as heat when the balls collide.
In special relativity however, you write it like this:
$$ m_{0}c^2+  E_{kin} = m'_{0}c^2+ E'_{kin}+ \text{other energies} ~.$$
Next consider an atom in a bound state. As dmckee told you, the system is in a lower energy state than the combined free states. This tells you that you have to put energy into the bound system if you want to break it apart. On the other hand energy is set free when you put the separated components together.
For our energy conservation equation we thus get
$$ M_{0}c^2 = m'_{0}c^2+ \Delta E_{kin}+\Delta E ~,$$
where $M_0$ is the sum of the masses of the components, $m'_0$ is the mass of the bound system and $\Delta E_{kin}$ is the difference in the kinetic energy between the two components and the bound system. Since the energy is set free during the process, $\Delta E$ is on the right hand side of the equation. To make things more clear, let's just neglect the kinetic energies, so that we have
$$ M_{0}c^2 = m'_{0}c^2+ \Delta E ~.$$
When we solve this equation for $m'_0$ we know how much the bound system weighs:
$$m'_{0}=M_{0}-\frac{\Delta E}{c^2}~, $$
which is obviously less than the combined masses.
This is where the mass defect comes from! It comes from the fact that mass and energy are equivalent and that in a process the whole energy, including the rest energy must be conserved. Conserved however means not that the energies involved can't change into other energies, just like in classical physics kinetic energy can change into potential energy or heat. In this case the energy set free (the binding energy) is converted from rest energy which the bound system misses.

How do the protons and nucleus know that they have to lose mass to produce energy...?

It's the other way around: the whole process sets energy free; for the energy conservation to hold, the bound system has to lose mass. You could think of this like this: 
You have two atoms floating in space. Now you draw a box around it. This box has now the content of 100 energy dollars, those are distributed on the rest energies of the two atoms. Now the two atoms form a bound state and in the process the box loses energy dollars since energy is set free. Suddenly you have only 75 energy dollars left in the box. Since you have only 75 dollars to distribute to the rest energy of the bound system, the bound system has a mass of only 75 energy dollars $/c^2$.

does a body which has a greater energy has more mass than the one which has a less energy?

Yes. Again, this is because of the equivalence of mass and energy:
since mass and energy are interchangeable in processes, you increase the mass of an object when you increase it's energy. That's also the case for the spring.
Another way to say it: the zero point of energy is now not "$0$" but $m_0c^2$, so when you put energy (in any form) into the system, the new zero point of energy is at $m'_0c^2$, with $m'>m$.
