It's very complicated, But to make a long story short, you affiliate with a performing rights society (BMI or ASCAP or SESAC)...you register any song that'll get radio time...etc. Radio Stations, television stations..etc. pay a certain amount to use a song, they pay that to the society...