What is the duration of the book contract?

When is the book contract concluded?

How much can I earn as an author and how do I receive my royalties?

I find the book publishing procedure difficult. Can anyone do the whole procedure for me?