This is kind of a loaded question, because there are a number of answers. How you pay a director can range drastically, from "pay-or-play" contracts, to scale, to a combination of a salary and percentage of the gross. Smaller, non-union directors might direct for absolutely nothing, with a deal for a percentage of any of the profits. Residuals are pretty much a union thing.
It is not uncommon for a lead actor to make more than a director. The exceptions being guys like Spielberg, who also produces his films, and are bankable just because of their name. Spielberg's name alone will put asses in seats, which is not common for most directors.
Usually, studios will have to link a director to a past success to try and sell him, which is why you get trailers that say, "FROM THE DIRECTOR [HIGHLY SUCCESSFUL MOVIE]."
Producers usually have an agreement that includes a salary and points on the back end. The farther down you go, the salary is smaller (if non-existent) and but deals are in place to secure a percentage of the film's gross.
Producing is where the money is made, and it's not uncommon to see someone credited and paid as a producer, even though the project has long left his hands. But because he originally got the deal in place and may have absolutely nothing to do with the film after that, he gets his exec producer credit and a sack of cash.