The TV network the show is on pays them, as any other network does to the people on their programs. You don't have to be an actor. It is all done the same way. The networks get millions from sponsors and use part of that to pay the people on their shows. Though, a contract has to be signed first. As the show becomes more popular then representatives for the people on the show will renegotiate the contract for getting higher pay. You remember the show "Friends". Those actors each got over a million an episode before the show went off the air. People who don't get paid to act but are on TV may not get as much money at first, other than talk show hosts. However, as a show is on longer then more sponsors pay higher fees to the networks and members of the show get paid more.