It goes like this.
Once you upload a video, lets say you have a copy written song in it. It will be flagged and checked by youtube's automatic system. If the system decides that you have indeed infringed upon a copyright law you can no longer generate revenue from it, HOWEVER the ads will stay play. The money generated from the ads goes to the original creator of the copyright.
And that's how it works.