Excerpt from Cellular and Molecular Immunology, 8th ED, p.181-182. Don't up-vote me, i just thought this text offers a good, up-to-date explanation.
The Mechanism of V(D)J Recombination
Rearrangement of Ig and TCR genes represents a special kind of non-homologous DNA recombination
event, mediated by the coordinated activities of several
enzymes, some of which are found only in developing
lymphocytes, whereas others are ubiquitous DNA double-stranded break repair (DSBR) enzymes.Although
the mechanism of V(D)J recombination is fairly well
understood and will be described here, how exactly
specific loci are made accessible to the machinery
involved in recombination remains to be determined.
It is likely that the accessibility of the Ig and TCR loci to
the enzymes that mediate recombination is regulated
in developing B and T cells by several mechanisms,
including epigenetic alterations in chromatin structure
and DNA as discussed earlier, and basal transcriptional
activity in the gene loci.
The process of V(D)J recombination can be divided
into four distinct events that flow sequentially from one
to the next (Fig. 8-10):
1. Synapsis: Portions of the chromosome on which the
antigen receptor gene is located are made accessible
to the recombination machinery. Two selected coding segments and their adjacent RSSs are brought
together by a chromosomal looping event and held
in position for subsequent cleavage, processing, and
joining.
2. Cleavage: Double-stranded breaks are enzymatically generated at RSS-coding sequence junctions
by machinery that is lymphoid specific. Two proteins encoded by lymphoid-specific genes, called
recombination-activating gene 1and recombination-activating gene 2(RAG1and RAG2), form
a complex, containing two molecules of each protein,
that plays an essential role in V(D)J recombination.
The Rag-1/Rag-2complex is also known as the V(D)J
recombinase.The Rag-1 protein, in a manner similar to a restriction endonuclease, recognizes the DNA
sequence at the junction between a heptamer and a
coding segment and cleaves it, but it is enzymatically
active only when complexed with the Rag-2 protein.
The Rag-2 protein may help link the Rag-1/Rag-2 tetramer to other proteins, including accessibility factors that bring these proteins to specific open receptor
gene loci at specific times and at defined stages of lymphocyte development. Rag-1 and Rag-2 contribute to
holding together gene segments during the process of
chromosomal folding or synapsis. Rag-1 then makes
a nick (on one DNA strand) between the coding end
and the heptamer. The released 3′OH of the coding
end then attacks a phosphodiester bond on the other
DNA strand, forming a covalent hairpin. The signal
end (including the heptamer and the rest of the RSS)
does not form a hairpin and is generated as a blunt
double-stranded DNA terminus that undergoes no
further processing. This double-stranded break results
in a closed hairpin of one coding segment being held
in apposition to the closed hairpin of the other coding end and two blunt recombination signal ends being placed next to each other. Rag-1 and Rag-2, apart
from generating the double-stranded breaks, also hold
the hairpin ends and the blunt ends together before
the modification of the coding ends and the process of
ligation.
RAGgenes are lymphoid specific and are expressed
only in developing B and T cells. Rag proteins are
expressed mainly in the G0and G1
stages of the cell
cycle and are inactivated in proliferating cells. It is
thought that limiting DNA cleavage and recombination
to the G
0 and G1
stages minimizes the risk of generating inappropriate DNA breaks during DNA replication or during mitosis. Mice without functional Rag1
or Rag2genes (Ragknockout mice) fail to develop B or
T lymphocytes, and Rag-1 or Rag-2 deficiency is also
a rare cause of SCID, in which patients also lack all
lymphocytes.
3. Hairpin opening and end-processing: The broken
coding ends are modified by the addition or removal
of bases, and thus greater diversity is generated. After the formation of double-stranded breaks, hairpins must be resolved (opened up) at the coding
junctions, and bases may be added to or removed
from the coding ends to ensure even greater diversification. Artemisis an endonuclease that opens
up the hairpins at the coding ends. In the absence
of Artemis, hairpins cannot be opened, and mature
T and B cells cannot be generated. Mutations in
ARTEMIS are a rare cause of SCID, similar to patients with RAG1or RAG2mutations. (see Chapter
21). A lymphoid-specific enzyme, called terminal
deoxynucleotidyl transferase (TdT), adds bases to
broken DNA ends and will be discussed later in the
chapter in the context of junctional diversity.
4. Joining: The broken coding ends as well as the signal ends are brought together and ligated by a double-stranded break repair process found in all cells
that is called nonhomologous end joining. A number
of ubiquitous factors participate in nonhomologous
end joining. Ku70 and Ku80 are DNA end-binding
proteins that bind to the breaks and recruit the catalytic subunit of DNA-dependent protein kinase
(DNA-PK), a double-stranded DNA repair enzyme.
This enzyme is defective in mice carrying the severe
combined immunodeficiency (scid)mutation, and mutations in the gene encoding this enzyme have also
been discovered in human SCID patients (see Chapter
21). Like Rag-deficient mice, scidmice fail to produce
mature lymphocytes. DNA-PK also phosphorylates
and activates Artemis, which, as mentioned before, is
involved in end processing. Ligation of the processed
broken ends is mediated by DNA ligase IV and XRCC4,
the latter being a non-catalytic but essential subunit of
the ligase.

Figure 8-10, Cellular and Molecular Immunology, 8e, p182.