the structure factor is the tool to classify the planes investigate the diffraction, the last are responsible about the determination the crystal structure.
The static structure factor is the Fourier transform in momentum (Q) of the instantaneous (i.e. equal time) real space correlation function G(R) that I will define below. The dynamic structure factor is a Fourier transform in momemtum and energy (frequency) of the time dependent correlation function G(R,t). Here Q and R are vectors, and the time t is a scalar.
More precisely - let A(r1,t1) be an operator defined at vector position r1 and time t1. The operator A could represent density (the most common situation that is probably encountered in practice) or something else, say, one component of a spin or angular momentum operator. The correlation function is
G(r1,r2,t1,t2) = where the < > represents an average over configurations and thermodynamic states, quantum states, etc. depending what is relevant.
In most situations encountered the average depends only on the differences
R=r2-r1 (vector) and t=t2-t1 so we can write
G(R,t) =
You can so some reading for the more general cases.
If we Fourier transform G(R,t) in the appropriate spatial dimension and in time we get the dynamical stucture factor
S(Q,omega) = integral{G(R,t)*exp(i[Q.R-omega*t]dRdt} where the differentials need to be correct (including Jacobians) for the dimension of space and I have omitted normalization factors.
For brevity I will now replace omega with w in S(q,w)
S(Q,w) contains information concerning the dynamics of a system. When we have the situation omega = 0 , i.e. S(Q,0) we are looking at the elastic part of the dynamical structure factor which is the Fourier transform of a long-time average correlation function. This often dominates the static correlation function (to be defined below) but isn't quite the same thing. If we are talking about a harmonic crystal S(Q,w) constains information about the phonon modes and is sharply peaked whenever Q and omega correspond to a momentum and frequency of an allowed phonon, i.e. fall on the dispersion curve. The inelastic neutron scattering cross-section provides one means of measuring S(Q,w) with both Q and omega resolved.
The static structure factor is an integral over omega of the dynamical structure factor:
S(Q) = integral{S(Q,w)dw}
As mentioned above it is often dominated by the elastic part of the dynamical structure factor, S(Q,w=0), but need not be identical. In practice this is the Fourier transform of a snapshot of the system (i.e. equal time correlation function) as opposed to a long time average correlation function.
That said, for a crystal this would contain the Bragg peaks and diffuse scattering.
As for the Debye Waller factor - for crystal structures and phonons that does enter into both of these, but you should consult a textbook (e.g. Marshall & Lovesey or Lovesey's books on neutron scattering) for details.
Finally - note that x-ray diffraction usually gives a good measurement of S(Q) in solids since the energy of s typical x-ray photon is of order 10 keV which is well above the energies of typical collective excitations in solids. On the other hand, thermal neutrons have energy scales of order 10 meV, and therefore neutron diffraction does not always effectively measure a full integral over omega.
The above is not necessarily completely general and I apologize if it is hard to understand or unintentionally misleading in any way, but I hope it answers most of your question and gives a starting point for some reading on your own.
Shortly, the structure factor, S(q), is the Fourier transform of the ensemble average of the distances between pairs of scatterers, at a given time, i.e. evaluated "instantaneously". As an image, you can imagine taking a 3D snapshot of all the N atoms of the sample (although with different weights, depending on the technique). Then, from the snapshot, you compute all the distances between the N(N-1)/2 pairs. The resulting "histogram", G(r, t=0)=g(r) is the pair correlation function. Its spatial Fourier transform is the static structure factor S(q).
The dynamic structure factor, generalizes this definition to the fourth dimension, time, computing correlations at times tau and tau+t for all t (in practice t is limited by the instrument). G(r,t) is the resulting function (the van Hove function). The dynamic structure factor, S(q,w) is the space and time Fourier transforms of G(r,t).
In x-ray and neutron scattering, one measures S(q) through the integral over omega (w) of S(Q,w), what corresponds to the snapshot at t=0 defined above. However, because of the detailed balance, temperature must be taken into account, namely its magnitude as compared to the Debye temperature. See: L.V. Meisel and P.J. Cote, Phys. Rev. B 16, 2978 (1977), for more precise details.
In a solid, differences between S(q,w) and S(q) result mainly from: i) collective excitations (coherent scattering: phonons, spin waves, ...); ii) vibrations, taken into account by the Debye-Waller factor and inelastic components (also in incoherent scattering, in the case of neutrons).
The Debye-Waller factor is perfectly defined in solid state. Knowing the interatomic potentials and the lattice, it can be evaluated precisely, what is not the case for amorphous solids or liquids.
You can see the DW factor as a "delocalisation" of the scatterers due mainly to temperature, although at T=0 it remains the 0 point motion. Naturally, the usual form exp(-Q2./3) is similar to the Guinier SAS approximation where the mean square displacement, is the equivalent of the radius of gyration of a particle. Within the harmonic approximation (low T), is proportional to T.
Because it represents a delocalisation, it depends only on q: a gradual decrease of the total scattered intensity with the scattering angle. Within quantum mechanics, it corresponds to the part of the radiation that is scattered inelastically.
Note: In studies of quasi-elastic neutron scattering, namely performed in back-scattering spectrometers, it is current the notation for all origins of decrease of the scattered intensity with q, even if they come from motions too slow to be "seen" by the instrumental resolution (without being "vibrations", strictly speaking).