Every year or two there is a story about a nonfiction writer who just made up a bunch of bullshit and called it his life story, or copied a bunch of info from other books without any attribution, or a fiction writer who lifted paragraphs or chapters from other books and called them her own.
We know that lying is wrong, and that copying other people's work is cheating. That's still covered in like, kindergarten, right? But still... writing a good book is HARD. And cheating can seem easy, and painless, by comparison. Particularly when there are thousands (or even millions) of dollars riding on your whipping up a good story on a deadline.
Publishers can't exactly compare every line of your book to every other book ever written, or make you take a lie detector test to prove you climbed the Himalayas that one time. But they do make you sign a contract. And that contract always includes a Warranties & Indemnities clause. This section is easy to gloss over because it doesn't contain any $$$ signs, but it is interesting and important to know about. Of course it will differ from publisher to publisher, and can get quite long and complex, but in general, it looks like this (LIBERALLY TRANSLATED):
a) You promise that you aren't plagiarizing this. You haven't stolen any of it. You aren't committing libel. This is not a violation of any obscenity laws. This has never been published before. You wrote this all by yourself and you have the right to publish this. The book does not contain recipes or instructions for anything that might cause somebody harm. ("Timmy read Magic Under Glass and learned how to bring the grandfather clock to life, and then it strangled him!")
b) You assure the publisher (and by extension anyone the publisher works with, foreign publishers, movie producers, whomever) that you really, really told the truth just now and they will not be sued for any reason because of something in your book. If it turns out that you were lying about any of that stuff before, you have to pay the damages and attorney fees. (Um, so don't lie.)
c) Provided that you DIDN'T lie before, you are covered under the publisher's insurance policy, so if for some reason you are sued, they will provide legal counsel and you are required to work with them to defend the case. (Generally, if you also want to hire your own lawyer you can at your own expense, but the publisher's lawyer has to be in charge of the case.) You still might be liable for some expenses, but otherwise you are covered -- unless of course it comes out that you were lying about any of that stuff that you promised you didn't lie abut before, in which case the insurance is off, and your publisher will leave you to twist in the wind, and did you know that lawyers in New York are very expensive? They are.
Aside from the financial burden, you will of course also ruin your reputation, and become a laughingstock and/or a pariah. Though it doesn't mean your career is necessarily over (bad pennies do keep turning up), people in publishing do loooooove to gossip, and media likes to get ahold of these stories when they are big, too, so it is safe to say that there will be repercussions far into the future.
Also, you will make your agent cry. :-(