It’s hard to imagine anyone but the author creating the table of contents, although with TOC software, it’s not unheard of for publishers or eBook formatters to do it, provided that the book is structured in a standard format (sections, chapters, sub-chapters etc.). And, if you’re a multi-million dollar, best-selling author of a dozen books, you probably have publishers falling all over themselves trying to make your work easier. (“Table of contents, index, glossary? No problem, Mr. Hemmingway, we’ll handle it.”) But, if you’re not (yet!), you’ll probably have to create the TOC yourself.
TOCs are not hard, but there is an important caveat worth mentioning: If you’re doing an eBook, getting the delivery device (Kindle, iPad) to recognize and properly display the TOC might be a bit tricky. Your third party eBook provider should be able to handle this, but if you’re doing it yourself, make sure you understand how to use your formatting software.
Another important thing to remember: Not only does your book need a TOC; your book proposal needs one as well. Unlike a screenplay, which utilizes a “pitch” (sometimes verbal, sometimes written,) selling a project to a publisher requires a professional proposal. This is one area where spending some money to hire a third party is well worth it, for if your book proposal does not conform to specific standards (which include a table of contents), you’re not likely to even get read. Obviously, the above doesn’t apply to an eBook, as you are publishing it yourself.
So, this one is relatively easy and straightforward. Who writes the table of contents? Generally, it’s the author. Is it hard to do or time consuming? No, especially given today’s sophisticated writing software. But remember, the software you use will require you to format your book in a way that will allow the program to recognize what does and does not go into the TOC. (Computers, after all, do not think.) Make yourself familiar with the ins and outs of the software and its capabilities before you begin your project.