Getting published is a business. This is something that writers tend to forget during their daily battles with commas and plot holes. Understanding how a business works, especially the general structure of a publishing company, can help writers understand why a publisher is doing what they're doing.
The one department everyone knows is the editorial office. In the editorial office, you have several levels of editors: editorial assistants, assistant editors, associate editors, editors, executive editors, and editors-in-chief. But even these titles aren't set in stone - you'll find supervising editors and publishers who work as part of the editorial team. Editors are mainly responsible for two things: they acquire books and they get the book ready for publication (often setting the production calendar).
In general, new writers don't work with the editor-in-chief. Your submissions are probably read by an editorial assistant. Less important books, and their content and developmental editing, go to an assistant or associate editor. The editors are also responsible for working with the other departments to get the book out on time, as they tend to be the liaison for the literary agents and authors.
Their other editorial job is to convince the marketing and sales teams that a book will sell. This is normally done in massive meetings, with the editors presenting books to the sales team. This is not done on a creative spectrum - instead, it's all about the money for the sales team. They don't care if the writer uses pretty language - they want to know why it will sell.
The sales team is responsible for convincing bookstores (and other bookselling agents) to buy copies of the book. They also may handle returns, depending on the size of the publisher. Their job is to get the book out there into the world and dealing with the business end of publishing.
The marketing team is responsible for promoting books. Sometimes, these are business-to-business marketing, like creating book catalogs for bookstores, or buying magazine advertisements for only their biggest books. Sometimes, a large publisher will also have a public relations department, which helps get authors on TV, radio, and in bookstores.
Once a book has been approved by the sales and marketing teams, it begins its production process. The actual physical production of a book is left not to the editorial department but to the production department. The production department is made up of both technical workers and creative designers. Managing Editors, Production Editors, Cover Designers, Pre-Print Specialists, and more can be part of this team. They often work with the printer to get the book ready for publication.
Once the book is ready, shipping, warehousing, and stock management is done either in-house by the publisher or by a distributor (like Ingram). A publisher might have specialty departments, like for Digital Publishing or Children's Publishing, that focus on only one branch of books. They will also have your standard business departments: financial, human resources, executives, etc..
Also, larger companies, like any of the Big Six, will be further divided into divisions or imprints, with each of the above departments broken into smaller groups. Sometimes, a production or marketing team is shared; sometimes, they're separate, too.
Each publisher works a bit differently, but these are the general patterns a publishing house will follow. Knowing who you're working with, and what they're doing for you as the author, is important for a happy working relationship with a publisher.