If the DNA is different the restriction enzymes will cut in different places, creating DNA fragments of different lengths. If the DNA is the same the restriction enzymes will cut in the same place, creating DNA fragments of the same length.
Background Biology
Step 4 of 13
DNA Fingerprinting