Work for hire means that you pay someone a fee to write something for you (or maybe you're the writer). Public recognition of the work for hire is not part of the agreement, and the "author" retains ownership and all rights pertaining to the product. In other words, the person doing the writing isn't named on the cover, and might not even be named in the acknowledgments, and that person can make no claim of ownership of the work.
Ghostwriting, therefore, can be a work for hire if there are no royalties involved and the arrangement consists of a fee only.
Sometimes the "author" of a book will hire several people to write the content of her book, all on a work for hire basis. Their work is done as soon as they submit what they were assigned (and which should have been spelled out in a written contract). The pay may be structured with 50% payable upon signing a contract and the remainder upon submission of the product. Some writers demand full, upfront pay, and others are paid in thirds (with the second third upon submission of a first draft, for example).
Often a managing editor of sorts is hired to make sure that content written by different people flows well and sounds like one person composed it. And that managing editor also falls under the work for hire category, although if many revisions and additional content is involved, this can also fall under the category of developmental editing.
If you are hiring a writer for a straight fee, you always need to shop around and ask for referrals (I get all of my business by referral). Whatever you do, don't use price as your main factor when deciding whom you will hire. You can get graduate students in English to write for practically nothing, as they want the experience. And some of them can probably do amazing work.
"You get what you pay for" isn't always true in the writing world, but more often than not you will pay more for a writer who is more experienced. And experience also has the added bonus of bringing efficiency in work habits, therefore you just might get your product faster from an experienced writer.
Finally, you never know what drives someone to price their services the way they do (unless you ask). For example, I like the work for hire relationship as I'm a project kind of person who likes to do something for a short period, then move on to something else. I'm not all that interested in royalties for a book I wouldn't have written without the "author," and I'm clear about that in my negotiations. I charge less for a work for hire because I can do it all on my own time, therefore my work is as efficient as possible. When I collaborate with someone, that inevitably is far more time consuming and often involves travel. My rates are higher for collaboration because I place a high value my time away from my home.
Today's tip: When in doubt about any part of the process, whichever side of it you're on--rather than making assumptions, ask questions!