The writers who create and adapt films and series, from feature screenwriters and TV staff writers to the showrunners who run whole series, paid by script, by episode or by week, plus residuals or royalties depending on the country.
Screenwriters are one player in the film & television industry, and an industry of their own, with their own suppliers, customers, software, regulators, and money flows. This full map is on the roadmap.
Meanwhile: how screenwriters fit into film & television