Based on the tendency to repeat the same songs over and over on a given station it seems like they have a finite selection of music available.
Don't know how or if they pay royalties on the plays. Considering how militant RIAA and publishing companies ASCAP and BMI are about collecting them I can't imagine the play is free, although non profit radio stations are often free or greatly reduced rates. Using Sonos I don't pay for Pandora at all, and don't look at the webpage ads either. But I guess someone does.