Identical, or monozygotic twins will have the exact same DNA as one another. This is because they came from one fertilized egg or ova that split. This fertilized egg already had the full genetic makeup of a human being. This egg then split in two creating a mirror image of itself. No change to the DNA or genetic code will occur. There will just be two identical people. Slight variations can occur between identical twins. These variations depend on weather the egg split in time for the body to develop two amniotic sacs or not. The actual position or placement of the twins in utero can also be a factor.
Fraternal or dizygotic twins are a very different story. Fraternal twins not only have two different genetic codes but can quite often be of different genders. This is because there are two separate fertilized eggs. They will also usually develop two separate amniotic sacs, placentas, and supporting structures. Dizygotic twins can commonly be male and female. Mixed gender twins occur when one X egg is fertilized with an X sperm, and the other with a Y sperm. Most commonly, fraternal twins are the result of fertilization of two different eggs from the same cycle during separate acts of sexual intercourse. There are even rare cases of this fertilization taking place with two different fathers. This is called Heteropaternal Superfecundation.