One of the things I've noticed as a junior developer is that the people I respect and admire the most are those that can own up to their mistakes and clearly/logically come up with a great way to resolve them.

Frankly, I aspire to have that skill - but I don't already have it. With this in mind - what are some of the things you do when you make a mistake? How do you communicate with your manager or user base and do you have any particular points to make the process of resolving the issue go easier for all involved?

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.
If this question can be reworded to fit the rules in the help center, please edit the question.

The first thing to do is to verify that there is in fact a problem, and identify what exactly it is (ideally in the usual bug report form: how to reproduce, intended behavior, actual behavior).

From there, the first thing to do is to inform your team and whoever is responsible for managing the product's code quality (project manager, team leader, product owner, scrum master, whatever). The longer you hide the fact that a mistake was made, the higher the risk of bigger problems ensuing.

The next step is to estimate the impact, find a quick fix to mitigate immediate problems, and deploy it. Then fix the mistake properly, and make sure it is tested thoroughly.

Whether and when you inform your users depends on the nature of the problem. Generally, I believe users have a right to know, unless other concerns weigh stronger. A typical example would be if your mistake causes a security vulnerability: disclosing details about it before a proper fix is deployed would be irresponsible, so in such a case, it is better to inform users after the fact.

And then the most important step: evaluating the situation. Ask yourself (and your team): What caused this problem? What could I/we have done to prevent it? What can we do to avoid similar mistakes in the future? What can be done to mitigate the consequences? Find answers to these questions, and implement them. In other words, make sure you learn from your mistakes - both as an individual and as a team.

There is no shame in making a mistake, but making the same mistake over and over and over is pretty embarrassing, and making a mistake and trying to hide it borders on criminal behavior.