The rubbing alcohol pulls the DNA away from all of the other junk. Before you put the alcohol in, the DNA is mixed in with the pulverized onion, water, meat tenderizer, soap, etc. To make it easier to see those thin white wisps of DNA, you need to separate it from all of the other junk. DNA is more attracted to alcohol than water. Thus, when the alcohol is poured on top, the DNA travels out of the water and into the alcohol. All of the other junk is more attracted to water than to alcohol, so only the DNA moves. As a result, you have just DNA in your alcohol solution.