I don’t know the answers to everything you asked, but I know a couple.
Generally, the studio lets the advertisers know that there’s a marketing opportunity in a script – say, beer prominently figures in several scenes. Any beer sellers who are interested will line up, take a look at the script and decide whether they want to buy in.
Every once in awhile, the would-be sponsors will line up and offer the studio a zillion billion dollars if only R2D2 and C3PO will wear Nike in the next Star Wars film.
And because major companies generally treat their brands individually, it wouldn’t be unusual for Budweiser to decide to buy into a film, but not Michelob.
Once you get past the basics, everything, and I mean EVERYTHING is negotiated to death.
I was involved in this particular type of marketing once (and only once, for which I’m grateful.) It wasn’t product placement, but having characters endorse a product. Here’s roughly how it went.
The manufacturer saw a natural fit between the characters and their product. In this case, the manufacturer approached the studio and offered to buy a tie-in.
The studio immediately started negotiating as to what level of endorsement they would accept (product in the background, product actually being used, characters endorsing the product, etc.)
Once we got the guidelines hammered out, we had to negotiate with the actors who played the characters, to get the rights to use their actual photos to advertise the product. The actors had their own ideas about what they would and would not allow their faces to be associated with, not to mention whether the endorsement included they, (the actors themselves), personally, or only the character they played.