Generally, fiction writers should have their book in great shape before seeking representation or publication. This means it has been written and revised. But you don’t send that out as a first correspondence with agents and editors. Instead, you send a query letter, which is a document that encapsulates the entire book and your credentials in one enticing page. (Two, at the most, but one is better.) If they’re hooked by your query, they’ll ask to see a sample of the book and, perhaps, a synopsis. If that sustains their interest, they’ll ask for the whole manuscript. Many agents and editors won’t sign an author—particularly a first timer they haven’t heard of before—without seeing the whole thing, which is why you want to have that polished manuscript ready to go.
For non-fiction, you don’t need a complete manuscript at the ready. As a matter of fact, agents and editors often prefer to start with a proposal, which is a document that describes the nature of the project in depth. Proposals often include a chapter-by-chapter breakdown of the book, a description of the market, and details about why you are the writer uniquely situated to write it. Proposals tend to be significantly longer than query letters as you’re essentially laying out the foundation of the book. Still, you don’t necessarily start off with the proposal. Many agents and editors of non-fiction prefer the query first, and will invite you to send a proposal if they want to see that. Both the query letter (for fiction and non-fiction) and the proposal are complex documents. It’s worth getting your hands on reference books to get more details and see samples before writing your own.
Keep in mind that preferences vary. Always make sure to check—and follow—an individual agent or publishing house’s writers’ guidelines.