I still do not understand what a resonance precisely is. Is it exactly the same as a particle? Or only an excited state?
And why does it make a peak in some diagrams? And which diagrams?
The first generation of elementary particles are by observation not composite and therefore not seen to decay. They are shown in this table of the standard model of particle physics in column I.
The Standard Model of elementary particles, with the three generations of matter, gauge bosons in the fourth column and the Higgs boson in the fifth.
All these particles interact with some of the existing forces, so there exist potentials between them forming bound states if the energetics of the interaction are appropriate.
The quarks in various ways bind themselves either by twos( mesons) or by threes(baryons) with the strong force and also interact electromagnetically. When bound into a proton the electromagnetic interaction with an electron creates the bound state of the hydrogen atom. Atoms create stable bound states into molecules.
A resonance describes a state in these potentials that is unstable, i.e. it decays in time within our observational horizon. A hydrogen atom for example can have its electron kicked to a higher energy level and be in an excited state, until it decays back to the ground state.
For low, non relativistic energies a resonance is a temporary excitation seen in scattering a nucleus with a neutron, for example. The term is extensively used in nuclear physics and technology.
In relativistic particle physics the potential model has been superceded by the quantum field theoretical one because of its convenience in description and calculations. These are scattering experiments where the measurement is of the total cross section, as @innisfree explains in his/her answer.
The $e^+$ $e^-$ scattering at LEP, an electron and a positron in a head on collision "bind" for a while at a specific center of mass energy and display the $Z$ particle. The cross section is a measure of how large the particles see each other, and at the $Z$ their probability of interaction is much higher than in the energies before or after. The $Z$ is then displayed as a resonance.
The independence from scattering existence of resonances, giving them the status of particles , is seen in the products of scattering experiments when appropriate combinations of outgoing particles, pions and protons and electrons etc, are plotted against their invariant mass.
For example here is the $Z0$ in the products of the high energy collisions in the LHC, when looking at the invariant mass of ($mu+$ $mu-$). The background has been subtracted here. The original is also in the link.
A typical resonance plot whose width is constrained by the experimental errors and is not the true width that would give the decay time of the pair.
Resonances, when the experimental errors are smaller than the physical width , are described by a Breit Wigner function from which the intrinsic width can be extracted, which characterizes the interaction . When the experimental errors are large a gaussian statistical fit will give the mass to identify the resonance but no information on the decay .
In an experiment in which particles are collided, a resonance is a large peak in a cross section (rate at which a process occurs) when plotted against the energy of the incoming particles. For example, when LEP collided electrons with positrons, they saw a resonance when the energy of the incoming particles equalled the mass of the $Z$-boson.
Resonances result from an $s$-channel particle - in the above example, that was the $Z$-boson, in the process $ee\to Z \to \ell\ell$. Resonances, like the $Z$-boson, quickly decay with a lifetime proportional to the width of the peak, and a mass equal to the energy at the peak. The peak itself is described by a Breit-Wigner.
Resonances have definite mass and charge and should be considered on an equal footing with other particles. In fact, most particles are resonances, because most particles are unstable and are only seen in this way.
In the quantum mechanical conceptual framework, the boundary between particles and (excited or ground) states vanishes. A particle is a state, and a state is a particle. (More precisely, particles are eigenstates of the operator of energy - in the low-energy case - or the operator of mass - in the high-energy case.) A physical system with a ladder of energy levels does not differ from the set of sorts of particles with a ladder of masses. Their mathematical descriptions are essentially the same. "Particles" and "states" are just two different languages for the same reality. They have arisen distinctly by historical reasons, and in the modern physics they are used interchangeably. (Sometimes the particular words are preferred by tradition.)
So, the resonance particle could be understood as the excited level or bound state of two colliding particles. If there is no such state, two particles bounce from each other indifferently (cross-section has no peaks.) But if there is such a state, then particles "stick" to each other, and that makes an increased cross-section value. Then they stay in such state for some time, before parting again, and that makes a typical Gaussian-like shape of the peak, with the width given by the rate of decay ($\Gamma=1/\tau$). That happens essentially the same for many different systems:
two atoms making a temporary chemical bond (to fix it forever, they have to lose energy somehow)
an atom and a photon, in the elastic scattering
a particle and another particle, whose energy is enough to make some third intermediate particle
and so on.