Everyone makes mistakes. We're imperfect beings, and mistakes are part of our nature. What is important is not whether or not we make mistakes, but how we respond to them. I believe a good response to mistakes follows a certain pattern.
1. Acknowledge the mistake. This is very important - if you don't acknowledge that it occurred, you can't do any of the rest.
2. Attempt to correct the mistake. If it can't be corrected (the classic horror story here is a surgeon cutting off the wrong leg), do the best you can.
3. Check this mistake against other mistakes you have made. If you see a pattern, then you are probably consistently doing something to cause these mistakes. Try to identify what it is, and correct it.
4. Investigate this particular mistake. Identify what caused it, and see what you can do to avoid it happening again.
Expanding on each of these:
Acknowledging the mistake
Apologising for the mistake comes into this category as well. But acknowledging it is the most important part. Accept that it happened, and that it needs to be corrected. If someone has suffered because of the mistake, acknowledge it to them as well. Even just 'this was a mistake' helps, but what they want to hear is an apology.
If you're representing someone, you may need to handle a mistake which you didn't personally make. If this is true for you, then you need to be the one to present an acknowledgement or (preferably) an apology.
A good apology accepts the responsibility for having made the mistake, for attempting to correct it, and for attempting to prevent a recurrance. An exceptional apology may also offer some sort of restitution beyond correcting the mistake, but I consider that a bonus and not a necessary part of handling a mistake well.
Correcting the mistake
Try to make a complete correction. Don't just correct the mistake itself, but check whether the mistake has repercussions and correct those as well.
Also, be honest and realistic. If you can't make a full correction yourself, say so and offer to do the research necessary to find out who can.
You're a home renovator. You were supposed to punch a hole through the wall between the kitchen and the living room, but instead your workmen punched a hole into the dining room.
The simple answer is just to take down the panel that was damaged and replace it with a new one, then paint the new one to match the surrounding paint.
The correct answer is to call in some favours. You're in the building industry, and have colleagues who can do the checks to ensure you haven't damaged anything else. Have an architect check whether the damaged wall is structural. Get in your usual electrician and have them verify that the wiring that runs down that wall is still fine.
Then determine what type of panelling the broken wall has, and what grade of insulation (if any) is in there, and repair the wall to at least as good as new.
There are two aspects to investigating a mistake: checking how this individual error occurred, and checking for a pattern. Both are important, and doing both will ensure that you know how to avoid a recurrance.
This is not about assigning blame. Blame doesn't matter, it never helps anything and it makes people miserable. This is about using the past to improve the future.
TV programs such as Air Crash Investigation show an excellent method of investigating mistakes. Unfortunately, most of us can't afford the in-depth investigation that the American National Transportation Safety Board uses for air accidents, but the attitude they have is spot-on. Their focus is on preventing further air accidents. If they identify a specific individual, company or group as negligent (or worse), that is for the courts to handle, not them.