Bacteria is a major source of restriction enzymes. Bacteria cells use restriction enzymes to cut foreign DNA at specific sites, which stops the DNA from infecting the bacteria.
Restriction enzymes are proteins that are able to cut DNA at only a specific spot. The enzyme recognizes nucleotide sequences and cleaves apart the sequence by adding a water molecule that splits the bonds between the two nucleotides. The DNA has repeating sequences, which means the restriction enzyme cleaves the DNA into thousands or even millions of pieces called "restriction fragments."
Bacteria produce restriction enzymes to fight against bacteriophages. Bacteriophages attempt to infect the bacteria by injecting DNA into the bacteria cells, which is why bacteria evolved to produce restriction enzymes to break apart the foreign DNA and resist infection.
Because restriction enzymes only target specific nucleotide base sequences, researchers are able to extract the enzymes from bacteria and use them to controllably manipulate DNA. There are three types of restriction enzymes, and the most helpful of these are the second type which will break DNA only within a certain parameter. Scientists can then identify which restriction fragments contain genes, and break them apart and combine them with other DNA strands, which effectively will clone the genes. At this point, there are more than 2,500 known type-2 restriction enzymes.