If someone were to file for (personal) bankruptcy protection from their creditors, is their entire debt wiped clean? And then they have seven years to wait before their credit history no longer reflects this? Surely there must be other downsides, otherwise why aren't more people doing this?
Well, there is a social stigma associated with bankruptcy, so there is that.
As to your other questions, they are going to vary by country. I'll speak the what happens in the US.
There are multiple types of bankruptcy, only the following two are applicable to individuals. Regardless of the type, it can legally remain on your credit for 10 years, although some credit agencies only report them for 7.
Chapter 7: This is the one you referred to where they wipe almost all of your debts. As you would expect, debts to the Government (taxes) are excluded. This will obliterate your credit rating. Note: This often requires liquidating all of your assets first and paying off as much as you can.
Chapter 13: This is where you work out a plan to pay back everyone, but legally get everyone off your back by buying more time and sometimes reducing the amount owed. It is not as severe on your credit.
Up until a few years ago, you used to be able to choose which type of bankruptcy to file, but now I think the law requires that you file a general bankruptcy claim and the judge decides which is appropriate.
One of the downsides is that a number of people have lent you money, expecting that you would pay it back. Bankruptcy is you saying "I'm not going to pay you back, even though I said I would".
The original intention of bankruptcy is that it is for those who have absolutely no hope of paying off the debt under any circumstances. If you are declaring bankruptcy for any other reason then you are essentially cheating your creditors. That may not be a downside for you, but it certainly is for them. Maybe this is what JohnFx means by "the social stigma associated with bankruptcy".
Note that I'm not talking here about the kinds of bankruptcy where you are given time to reorganize your finances, enabling you to pay back your debts in full - only the kind where you don't pay them back.
If someone were to file for (personal) bankruptcy protection from their creditors, is their entire debt wiped clean?
Assuming U.S., not right now. JohnFx already discussed taxes. There is also the concern with private student loans. AFAIU, currently, the law (as of 2005) is that even with bankruptcy you are on the hook for your student loans, whether private or federal. I've heard the only thing that discharges the debt is the debtor's death, and even then I heard a story about the creditors coming after his parents.
That said, I also found a source that says in some cases "undue hardship" can be argued--in court, with no guarantee of it being granted--to discharge private student loan debt with bankruptcy.
I find this abhorrent. There are now two bills in committee in Congress to rectify this (and to make private student loan debt vulnerable to bankruptcy, at least with regards to private (non-govermental) student loans. See this article: http://www.usnews.com/education/blogs/student-loan-ranger/2011/06/22/congress-proposes-relief-for-student-loan-borrowers
There is also a great hour on student loans generally that addresses their special immunity to bankruptcy on On Point, a talk show from Boston: http://onpoint.wbur.org/2009/02/25/student-loans