Basically they are both soluble in water, but opiates are more soluble than acetaminophen. So when the water has completely dissolved the opiates it will partially take some acetaminophen, but since cold water is more dense it has less ability to hold the solute and filter out the less soluble compounds. It is a form of fractional crystallization, you are taking advantage of the differences in the various solubility of the compounds.
So both go into water, mostly opiates are retained and some acetaminophen. Water is cooled causing it to "let go" of some of the acetaminophen and it precipitates into the solution. The using a filter we can remove the crystalized APAP. Caution tastes like ass as most opiates do.
Peace