Protein synthesis occurs in the ribosome, which is outside of the nucleus.
But, since the DNA is such a big structure, it can't leave through the tiny holes in the nucleus membrane.
So instead, it creates a copy of the gene, which will be small enough to leave through the holes.
This copy is called mRNA (messenger RNA).
For the mRNA to be made the DNA has to be separated (not in double helix).