Please allow me to explain a little about how traditional publishing works so that I can thoroughly answer your questions as briefly as possible.
Typically, your book will either be a funded project (paid for by a company or rarely, by the author) or will be adopted by the publisher (at no cost to you, the writer). Traditional publishers will receive your pitch/application letter. You will usually need to fill out our author's questionnaire. This will allow us to get to know you and your book more in order to determine whether publishing your book is a lucrative project to undertake. The publisher has the full right to deny your book if they do not see an appropriate market or do not believe that they will be able to reach your target audience. If we like your book and want to publish it, we'll then sign a contract. If a contract is not signed, the author retains all writes to their work.
We (the publisher) will then manage and pay for just about everything related to the creation of the book. This includes the editing, proof-reading, layout design, printing and distribution. In return, you would receive a royalty payment as agreed in the contract. A royalty payment is the percentage of the profits from sales to which you, the author, would be entitled. This percentage is not fixed and varies between projects.
I hope that this answered all of your questions. If you have any more questions, please feel free to leave a comment below.