In the first figure, RF is the radiofrequency pulse, a slice selective 90-degree pulse followed by two 180-degree refocusing pulses. GS, GP, and GF are the slice selective, phase-encoding, and frequency-encoding gradients, respectively. "Echo" represents the signal received from the slice of interest in the body. A short TR and short TE will give a T1-weighted image, a long TR and short TE (first echo) will give a proton density image, and a long TR and long TE (second echo) will give a T2-weighted image.
An example of the changes in the net magnetisation vector for a spin echo sequence with one echo is shown in the second figure. After 1/2 of the TE time, dephasing of individual spins in the volume occurs as represented by the black and red arrows. The 180-degree RF pulse flips these spins to the opposite side in the x-y plane so that after another 1/2 TE, they refocus and are detected.