When you write a song that is likely to be performed (see below) by someone other than yourself, and if you're smart, you will join and register your songs with a Performing Rights Association. (from here on called PROs) In Canada, it is SOCAN. In the USA, it is either ASCAP or BMI, and in the UK it is PRS. For more info... http://en.wikipedia.org/wiki/Performance_rights_organisation#International
Now, the legal definition of a 'performance' as it applies to copyright includes both live performances of the material, or performances of the recording itself - this includes radio, TV, online sources, etc. In other words, when your CD gets played on the radio, you receive a performance royalty.
If your material is not likely to receive any commercial radio or TV play, there isn't really any point in registering your songs with those organizations just yet.
When you do join (which is typically a free membership and can often be done on line), you only need to join one. So, for me, even though I am a SOCAN member, I don't need to join BMI. The reason is that these PROs have what is called 'reciprocal agreements' with each other, meaning they share their data and ensure royalties are paid as appropriate. So, if one of my songs is played in SanDiego, SOCAN will receive this data from BMI or ASCAP and I'll still get paid for it.
These PROs get their money from fees paid to them (called tariffs) by music users. A 'music user' is a person or organization that uses music to sell or enhance their product or service. This includes, but is not limited to radio stations, TV stations (even for things like the music they play when they roll credits on a news program or underneath a traffic report), dance clubs, pubs, restaurants, supermarkets, telephone 'hold' music, festivals, school boards, and even the shoe store who plays CDs in the background.
Commercial radio and TV pay a monthly licence fee which represents a percentage of their revenues. They are required by law to track every piece of music they use by title and artist. Those tracking sheets are submitted to the country's PRO and checked against their database of artists. The PRO then uses this data to pay their members. Commercial radio play is about $1.47 per play per station, and commercial television is about $1 for every ten seconds used. (which varies, I think, depending on context, etc.)
Performance royalties are not payable if you have a video played on a music video station like MTV or MuchMusic. The rationale is that they are playing a commercial for your band, and they're not charging you, so you should be happy. Stupid, IMHO.
Most other music users pay an annual licence fee, or in the case of a festival or something, a per-event fee. This annual license fee is collected by the PRO and divvied up among their top 'X' number of artists. That means, when my song gets played on campus radio, Celine Dion gets paid for that. Well... she gets a portion of those blanket license fees. The rationale is that it is unreasonable to ask a lot of those music users to track the music they use, and it is unrealistic to have SOCAN track a further tens of thousands of entries, just so Celine Dion can get a pile of money for her inevitably many recorded performances beamed into supermarkets all over the world, and I can get my measly 35 cents for getting a half a dozen plays on campus radio. I wish there was a better way, but I can't think of one.
Now, what does that mean for the average Joe playing in a band in a local club? Well... since the pub pays their annual blanket license, they are allowed to have performances of music from anyone from ABBA to ZZ Top. So, if you want to go in and play a Van Halen cover, or even cover a song from your friend's band, or any other song you didn't write yourself, you can. The band you used to be in who doesn't want you playing their song can't come in and tell you not to play it any more than Robert Plant can stop you from playing a Zeppelin tune.
The onus is on the club to pay this fee. You have to assume they have. If the copyright police swoop in and find out they haven't paid the fees, that's their problem - not yours.
One thing to watch, though, is playing songs that you did not write in a venue that is not required to pay a tariff as a music user. Let's say you're having a street party. You would be required to pay to use that music. Logically, this would be a small fee in comparison to the fees required of a large festival drawing thousands of people.
Another place to be careful of is banquet halls. Depending on how they operate, they may not be required to pay this fee. The survival of their business does not depend in any way on them having music. It depends on their ability to rent out their space. The success of YOUR EVENT might be dependent upon the use of music, but not their banquet hall. So, you might want to ask about that before booking a place like that.
For a list of Canadian tariffs, here is the exact link to the SOCAN tariffs to give you an idea of how they work.