An executive producer means different things on different projects. An executive producer on a film is very different from one on a TV show.
In movies, an executive producer is responsible for financing the production of a film - this does not necessarily mean they invest their own money. Usually, they find and negotiate the funding from one or more investors. This can be why you see a movie star credited this way, because they've helped convince investors to fund the film.
There is no set percentage or fee for an executive producer; it's up to all the parties involved (executive producer, other producers, any investors, etc.) to negotiate a rate before any work is done.
If the executive producer successfully raises all the investment and the film goes into production and is distributed, the executive producer (along with most of the above-the-line team and investors) participate (i.e. receive) any profits.
If the film does not make any money, nobody owes anyone anything. Usually a production company or LLC is formed in order to protect any and all assets and people involved in the production of the film.
So if I were making "Godfather 4," I would form a company with the other producers and investors called Godfather 4, LLC. And all profits and losses would be through that company. Nobody would 'owe' anybody anything. If Godfather 4 doesn't make any money, then the investment is considered a loss.