The contract is the aim of much of your writing - the publisher's promise to publish your book as long as you write it properly, the publisher is still solvent, and you can agree the terms. I'm not going to say anything about contractual terms here as I've covered pretty much everything in the series How to read a publishing contract. But I will repeat one important point - don't assume the contract is written in stone. Actually, two points - don't be cheated in your pitiful gratitude that someone wants your book.
The contract the publisher sends you is a starting point for negotiation. They may well say it is a standard contract (it is; that just means it's the template they start from) and that everyone else signs (possibly true, especially if they don't have any astute or professional authors in their stable). Of course, the terms in the contract will favour the publisher at every turn. There will be clauses that, if you query them, the publisher will claim 'will never be used'. Fine; if they will never be used they can be removed. Do not be bullied. They want your book or they would not have offered you the contract in the first place. Read it carefully, and maybe have it read by the Society of Authors (if you are in the UK). Make sure you understand it all. Yes, I know it's about ten pages long, written in legalese and boring. But that's exactly why you DO need to read and understand it.
Once you have signed the contract, you won't be able to change the terms unless some significant event changes things rather dramatically. So if you sign a contract saying you will deliver your book by 31 December, you have to do that. Running out of time is not a good reason for delivering late. Losing the book because you didn't back it up and your computer breaks is just professional negligence, so don't do that either. If your family is wiped out in a fire, that is a good reason but you need to tell the publisher long before the deadline. (If the tragedy happens a couple of days before the deadline, you will have written the book already, so it won't be a problem.)
A contract is not a gift, it is a professional agreement and you should enter into it as a professional, not as a grateful wannabe-writer. Just as no writer has an automatic right to have their book published (most books written or proposed are crap), so no publisher has the right to dictate unfair terms and have you agree to them. Don't sign away electronic rights for 2% (or nothing); don't agree to do endless publicity for nothing for a flat-fee book; don't agree to revise a flat-fee book as necessary for future editions without another fee. In short, don't agree to be exploited or cheated.