Once you've got the work, you can register it with the Copyright Office or you can wait until it's published and register the copyright then. Publishers often do this for you. Sometimes they forget and you need to check that a year after publication to see if they did. (One of my publishers forgot to register one of my works at the time--I registered it myself later.) This is often called "copyrighting" but the actual legal situation is that the copyright already exists and you own it, but until it's registered, you cannot sue for monetary damages. You can however sue to prevent further use.
The only exception to the writer owning the copyright from the get-go is when the writer does "work for hire." In that instance, the copyright is owned by the entity that "hired" you. Movie and game tie-ins are often work-for-hire. I once wrote a story for an anthology on "work for hire" terms--I cannot use that story even in one of my own anthologies. A writer may have good reasons for writing in situations where he/she does not own the copyright (money ranking largely there, but also prestige: I do not own the copyright or partial copyright to the two books I wrote with Anne McCaffrey, but the chance to write with her and have our names joined on the cover of the books, plus the generous contract terms--I'm still getting royalties from those books--were more than worth it.)
When a publisher "buys" a book, they are not buying the entire copyright: they are buying a license to publish--the right to make copies and sell them according to the terms of the contract. Contracts have specific terms of the license and specific requirements for the publisher to meet. For instance, the contract likely specifies that the publisher will produce the book within 18 months, in a specific format, for a specific advance, with a specific royalty rate, and that failure to do so voids the contract. That's only a rough guide, but you get the idea. If the book is not kept in print (which means what the contract says it means) the writer can request and must be granted reversion of rights. Any rights not granted in the contract remain with the writer (such as, but not limited to, foreign sales, movie rights, audio rights, e-rights...) Writers do not "give up" their copyright to the publisher: they license specific, contractually agreed, rights. However, once having licensed out those rights, the contract will also specify that the writer cannot sell those rights to someone else in the same area at the same time.
To repeat: you the writer own the copyright for your work from the moment of creation. You own the copyright for that work in any form in which it may appear: hardcover, trade paperback, mass-market, ebook, audio, graphic novel, moving picture, television series, videogame, foreign languages, etc. No one has the right to profit from your work without contracting with you for the specific rights they want. You may grant that right at any price point you wish (and can get...but my point is if you want to give it away, you can. That is legal. Stealing it is not legal.)
Let's look at forms of infringement. Case one: Suppose you're an unpublished writer and you just moved from one state to another, found a new writing workshop group, and read them a chapter of your first (unpublished) novel "Caravan to Gobblygook." You're workshopping it because you don't feel ready to send it out for publication. In this group is Slimeball. Slimeball seems friendly and shows great interest in your novel. Begs for more. Begs to get to read the whole thing. You, being a trusting soul, lend Slimeball the paper manuscript or email Slimeball the digital file, with the usual "It's not really ready yet" disclaimers.
You get the pile of papers back, and Slimeball tells you the middle was disappointing (which you had been worrying about) and you go back to work on your second novel, which you think is better. Six months later, Slimeball, who is no longer in that group, announced on a local writers' bulletin board that his/her first novel has been sold "Trails to Mucklymuck." You don't think anything about that (being deep in your second novel, like a good novice writer) until you see the book on the review lists and realize that the plot is remarkably like your still unsubmitted novel "Caravan to Gobblygook." You look at the book in the bookstore. It's not just remarkabley like, it's word for word like, except that the main character is Marty instead of Bart, and Gobblygook has becomne Mucklymuck...pure global search and replace. You're furious and heartbroken...your novel WAS good enough for publication but someone else has the prize. Slimeball's phone's been disconnected and you have no current address for Slimeball.
Are you sunk? No. If you can prove that your ms. is substantially similar, and that it existed before Slimeball's, and that Slimeball had access to yours...Publisher will retract "Trails to Mucklymuck" and blackball Slimeball forever in the publishing industry. You won't get monetary damages (most likely) but you will see Slimeball get his. What will help prove your case? If you read the first chapters to your former writers' group a year ago...that can prove your ms. was in existence back then. You may have outlines, notes, maps, charts, sketches, that you made and Slimeball never saw) with handy dates on them from a year or so back. Your having shown Slimeball your ms., something you discussed doing in front of your current writers' group, provides evidence that Slimeball had access to your work. Slimeball is guity of plagiarism (claiming your work as Slimeball's own) and copyright infringement. The publisher is guilty of inadvertent copyright infringement, but it's in Slimeball's contract (it always is) that any damages resulting from infringement will fall on the author, not the publisher. You will retain copyright in your own work.
Case two: You wrote a poem, story, or novel when you were 18 that you were too shy to send to a publisher. Now you're in college, you think it was kind of juvenile and are glad you only showed it to a few friends. One of those friends decides to surprise you for your birthday by drawing some pictures to go with it and putting it up on his site on the internet..."At last you get to see your work published, and out where everyone can read it." You are mortified, especially since younamed your protagonist (or the lover in the poem) for your then-significant other with whom you had a row a year later and you still can't stand each other. WIth no bad intention, your friend has violated your copyright and your privacy. (Case two-A: the good friend sends your work off to a publisher in your name, without permission. It's totally the wrong market and your friend's cover letter, purportedly from you, makes you look incompetent as well as naive.) It's going to end the friendship, probably, but you can tell Friend to take down your work and explain why what Friend did was wrong. Unfortunately, someone else may have downloaded what was on Friend's website and uploaded it somewhere else before you got Friend to take it down. Worst-case, friend won't take it down without a court order or contacting Friend's ISP.
Case three: You have sold your first novel and it's just out. Like most first novels, it's crawling its way up the sales numbers; you're holding your breath to see if it's going to do well enough for your publisher to publish the second book. You need every sale you can get. Someone sends you email pointing you to a site where your entire book is offered free (but full of errors from scanning that make you look illiterate.) Six months later, your editor tells you the publisher is dropping you because your sales weren't high enough. This is pure copyright infringement and theft--it cost you the chance at a second book with that publisher, and possibly with any publisher. Note that many writers have been in just this position with books in the past year--not only first-novel writers. Publishers have shed writers that weren't viewed as profitable enough, and it's naive to think that the availability of free books doesn't affect sales.
Case four: You have sold five novels and are negotiating a contract for two more. You have a reputation and an established readership. Your sales have been above average but not spectacular; your books sell well into the second and third year, so your publisher is happy for now, but does let the books slide in and out of print...does not order a new printing the instant the inventory drops below a certain number. Publisher has e-book rights; your e-books are a small part of the income stream, but it's growing slowly. Google (or a Google-like entity) suddenly digitizes a book that was "out of print" the day they looked at it, and plans to offer that book for downloads at less than the cost of an e-book from your legitimate publisher. Other editions of your book are available, both new and used, and so is your publisher's e-book in whatever flavors it comes. Will readers be smart enough, loyal enough, to pay more for your publisher's e-book or a print book than the cheaper download from Google? Probably not. Probably at least some will take the cheaper route, and cost you and your publisher sales (Google sales are not counted in your favor by your publisher.) So as far as contract negotiations are concerned, your publisher sees a hole in the bucket--and rightly so. This is infringement of copyright, hurting both you and your publisher. Your publisher will sell fewer copies--and you will be credited with worse "numbers" through no fault of your own. It is tantamount to theft.
Books come in many varieties. Some are (and are intended to be) ephemeral...my step-grandmother once gave me a book with padded covers, full of inspirational quotes. All of them from other books I already owned (Bartlett's Quotations among them.) Gift books like this routinely end up in trash cans. (This one didn't, because I think of her, but I never look at it, and sometime soon it may go the way of most.) Some are of interest only to scholars in narrow fields (what was known of magnetohydrodynamics in 1950? Most of us don't care, don't need to know, and don't want to know.) Some are of broader interest even though outdated for practical use (craft techniques of past centuries, for instance. We don't use querns but if you're writing historical or fantasy fiction, it's useful to know where and when querns were used.) I own books on harnessing and using draft horses and oxen, books on blacksmithing, etc. Some are useful today (but may not be in fifty years.) Some are books of "fact" now known to be false and will only mislead readers who don't know that (G-d forbid anyone use the medical advice in a book my great-grandmother owned: "The Perfect Woman!" Pre-immunizations, pre-antibiotic, and almost pre-germ theory.) Some books of poetry, some books of fiction, are just plain bad. Not interesting-bad, as in something scholars might use to compare to other contemporary work or to tease out social structures, but just boringly, mind-killingly bad from conception to execution.
So is it a benefit to society if every book ever written were preserved forever and available to all? No. Knowledge important to the survival of human life is not hidden in some book that went out of print in 1926 or 1934 or 1617. There are interesting data, to be sure, but most of it, even when interesting (as in a book on bread-baking in England that I read recently) is merely interesting--not necessary. I was a good home baker before I read that book; within a week of reading it, I saw a TV cooking show demonstrating a technique the book mentioned in passing in far more detail. I didn't need it; I just enjoyed it. So the argument that every book should be made easily available to every potential reader as soon as possible does not hold up. It would satisfy the wishes of people who want to read specific books (though they would not read all the books--no one can) but it is not necessary and does not justify infringing on copyright to make any book available.
Back to copyright: the term "orphan book" has been used to denote books that are not in the public domain (or not in the public domain for sure) but whose rightsholder cannot be easily located. The existence of such books has been used to justify breaching copyright for all works. But let's consider why "orphan books" are considered a problem. Someone wants to use those texts to make money. That someone is not the writer (who would have the rights already) but someone else who wants to assert rights he/she does not have. Let's consider you the writer, now in your '70s. In your twenties and thirties, while working at a newspaper, you wrote, and had published, 3 novels and five short stories. The novels got modest reviews, nothing too encouraging, and they had modest sales--in those days, the publisher would have kept them on the list for up to ten years, hoping for the best. The best didn't come, and they went out of print. You renewed your copyrights (back then you had to) and then got lifetime copyright in a later revision of the law. In the meantime, you went back to school, got a law degree, and made real money doing personal injury law....and have now retired to a lakeside cottage in Canada. You no longer have an agent (if you ever did) and your publisher, being absorbed into a multi-national, lost the records--not that you bothered to tell them where you lived once the rights reverted. You're not proud of those novels, really--they're very much of their time, they reflect what you now think of as a rather juvenile attitude--you're glad they're not around anymore and you never mention them. Your daughter read one of them once (from your own shelves) and went "Eeuw! Dad! Did you really write this?" Your son never read them, since he doesn't like fiction. Fine, you mutter. Forget the whole thing.
Do you have a social obligation to benefit society (!) by being available so these books, which you yourself don't want to see published, are made available? I don't think so, any more than you have a social obligation to show everyone in the world your old press pass or your old high school band uniform or the photos from your past life.In this case, even less social obligation and more right: you, as the creator, are legally entitled to decide whether your books should be brought to light or not. If you spend the rest of your days looking at the scenery outside your windows, or walking by the lake, and Google (or anyone else) can't find you--that's your right. If someone finds one of your novels in a library book sale and falls in love with it and wants to share it online...tough. They have no right to do so without your permission, and if they can't track you down, they must not do so. And if you turn on your computer one morning and find that someone has tracked you down, you have no obligation to allow them to re-publish the works. Should you find that Google or someone has declared your work to be "orphan" and used it while you still own the copyright, you are entitled to be annoyed.
Here's the thing: the desires of readers do not trump the rights of writers. Not legally, not morally. Stealing from a writer is the same as stealing from anyone else: wrong. At this time (laws do change, believe me I know that) writers have no obligation, legal or moral, to make what they write available to anyone, ever, at any time. Most of us do, through normal, legal publishing venues. Some do through scam publishers and get stung. A few secretive souls don't seek publication and their genius is discovered after they're dead. But we don't have to. Someone wanting to read something I don't want to share is just like someone who wants a shirt I own and want to keep, a loaf of bread I just made and planned to eat. Someone wanting me to give them a free text is just like someone begging for a free meal or a free shirt or a free loaf of that bread. I do give things away...but when it comes to what pays my bills I have limits on what I can give away without hurting my own family. Lots of people want the free and easy...and they don't consider what it costs those who write the books they say they like.
Copyright protects writers. Copyright allows writers to get some return from their writing. Copyright was set up for that purpose--for the benefit of writers, as a way of encouraging them to write more and better.
How hard is it to find out if a book is protected? Not that hard for publishers, really, though it does cost some money and time.
For individuals who are not publishers, who have no reason to create multiple copies of a book they want to read, there are multiple solutions to finding an older book you're not sure of. 1) Check your local library. If it's not there, see about Interlibrary Loan. If you can check out the book, you're home free in terms of you having access to it. 2) Check local and national used book stores (online catalogs are available.) You may be able to buy it. 3) Keep looking--books show up sporadically. Put out a request for it. 4) look online--someone may have already determined that it's in the public domain and it may be posted somewhere. 5) Check with the publisher. For more recent "I can't find it" books (past 25 years, say) double-check the publisher's catalog or write the publisher. The book may have been listed as "unavailable" by one of the distributors during a gap between one edition and another--it may re-appear.
I own a lot of older books--from obvious public domain (19th c.) through the difficult period (post WWI - 1975, when things got simpler.) Most of them I found in used book stores; some I found by ordering them online. I have one copy that I made of a book important for a story, that I had to return to the library (got it by Interlibrary Loan)--a copy that I have not shared with anyone and did not multiply, even though the book was clearly out of copyright. The argument that because some books whose copyright status is uncertain can be hard to find, therefore everyone's copyright can be violated is...um...unsound.
Google digitized several of my books. None are in the public domain as is obvious from the copyright dates (late 1980 to present, conferring lifetime-plus protection.) All are available, in one edition or another, from my publishers. I am not hard to find with a name search in Google and it is clear that I am alive, and thus my books are protected (would have been even if I'd died in 1990, due to post-mortem coverage. There is no excuse whatever for Google's actions with respect to my books.
There is also no excuse for Google to have made claiming one's books so arduous, other than a desire to bore/annoy/confuse writers into making mistakes and missing an edition. It should have been possible to claim/assert rights with one button per title (not per edition--copyright is for the work in any form, remember.) There is no excuse for Google to have grabbed rights internationally, covering all books published in the US or in any Berne Convention nation. Google has done nothing but grab rights and is requiring writers to spend hours trying to pry their sticky fingers off the works.
Which I'd better get back to, so I can finish before the deadline.