Adrian wrote a fine post a while back on the topic :
http://www.guitarforum.co.za/general-music/infringing-copyright-or-not-that-is-the-question/msg265294/#msg265294
It doesn't fully answer the question - but it's as close as I can find (Adrian is practicing IP/Music law).
The youtube question is a grey area to me - there's a lot of copyrighted material uploaded by people who are clearly not the owners/originators of the material & the uploader is potentially profiting (via youtube advertising) from the material. Allegedly youtube is paying some of the royalties to the originators of the material - but it's a fraction of what the artist may get from traditional royalties sources (including itunes/bandcamp).
In my layperson approach, I have done one track (remix) where I was concerned that I'd get flagged. The answer (about 3yrs ago) was to purchase licences for internet play - worked about to about 20USD/1000 plays. I never did, track has been up on soundcloud for 3 yrs (around 1000 plays) and I've never had an issue. If it went viral (millions of plays) I'd probably have to talk to Adrian, but until then I reckon I'm safe.
For the challenges - I like to err on the side of caution - exactly like Studmissile mentioned, for purposes of liability. Many times I've wanted to do a cover challenge, but the headache of getting material licenced always put me off.
Farrrr easier to do a challenge like we are this month - take the nuts and bolts (chord progression) and use that as inspiration.
There's also a fairly big industry for advertising, by 'copying' songs without infringing copyright - usually for advertising where the original artist wants too much $ for licencing or hasn't given permission. One that always sticks out is the Pringles ad from a few years back, the soundtrack was 100% Blur's Song2 - but different enough for them to get away with the composition (The drums were identical!).