When Google detects two sites with the same content on a page of the site, the content will be attributed to the site with the highest page rank. In other words, Google assumes that the site with the higher page rank is the more reputable site and attributes the content to this site. The other (lower ranking site) is considered to have committed plagiarism and is penalised (even if the content originally came from this site).
In addition to this, any links to the content in the perceived plagiarism site are attributed to the higher ranking site.
The see an experiment testing this visit the attached link to Dan Petrovic's Blog.