Composers are generally compensated by taking a flat fee, half up front, and the other half upon completion. I have heard of some people (scoring lower budget films) doing a per-minute dolar amount, as is done with games, but this is not commonplace with films.
If you want to know how much, this is not something that anyone can answer for you. Fees are literally all over the place, depeding on the film, the budget, how much music is needed, etc. Just be sure to put in the contract that any musicians that are hired to play any of the music, are paid for by the production. The last thing you want is to get paid (for ex.) $2,500 to score the film, and then have the director tell you they want this and that live, which will cost you $2,000 between studio time and musicians. You have now been paid $500 to score the film.
Best of luck.