If you're lucky enough to break into print with a major publishing house or a university press, all costs of publication will be borne by the publisher. You will, however, be expected to participate in the promotion of your book.
There are numerous self-publishing entities such as Outskirts Press that allow you to upload your manuscript and cover art for a fee based on the size, length and complexity of your project. In addition to the assignment of an ISBN (International Standard Book Number), professional printing services and marketing assistance, it will make your print-on-demand (POD) hardcover or paperback book available through major distributors without you having to maintain inventory. Costs range from $600 to several thousand dollars.
EBook companies make their books available as CDs or computer downloads. The initial setup costs for authors range from free to several hundred dollars. Research these carefully as many of them require you to purchase a certain number of books yourself, use their design services (several hundred dollars) and/or purchase ads and banners to promote your work.
A lot of people don't realize that their neighborhood Kinko's isn't equipped to produce hardcover books or trade paperbacks. For that, you'll need to find a printer specializing in book binding and ask for a quote based on the size, length, binding and number of copies. The setup charges can run between $4,000 and $10,000, plus you'll be required to purchase and warehouse 500 to 1,000 copies of the finished product. ISBNs are not supplied, nor does the printer participate in any marketing or distribution activities.
The least inexpensive way to get a book published is to create your own eBooks and CD downloads and sell them through your website. Your only out-of-pocket costs are for web hosting, CD' with jewel cases, mailers and postage. ISBNs can be purchased in blocks of 10 for $275. If you're proficient with Pagemaker or Quark software programs, you can easily do a professional layout yourself.
If your book is a text that's strictly going to be used in classrooms, your best best is probably to have it reproduced and bound at a local print shop. The cost is about 5 cents per page for camera-ready copy; discounts are generally available for volume orders.