Basically, PROs like ASCAP, BMI, et.al. issue licenses to perform your songs and track their performances so that you can get paid. They represent publishers and writers and issue licenses for bars clubs, restaurants, television shows, etc. to use your songs and for you to be paid for their use. The Harry Fox Assn. does the actual collection of money. If you are a published writer or self-published membership is free and they take a small percentage of your royalties as dues. You must have songs actually published and getting play of some kind to be considered for membership, though I think most PROs have some kind of associate category where you can learn the ropes. Usually when a novice writer contacts PROs, they are sent a basic information kit that explains how they work in detail.
To a limited degree you can perform some of the functions of a PRO yourself, but if you are successful to any degree, you're going to have your hands full. I do some licensing of unpublished songs to young artists trying to put together original material for demos or live performance. It's basically a barter system where they get a limited license to perform some of my songs and I get a good demo tape of my songs by decent musicians. That way I have a good quality demo to pitch and they have some songs that aren't covers.
I strongly recommend that you check out Randy Poe's book titled
"Guide to Music Publishing" for detailed information on the whole process.