Mistakes at work are inevitable, and so is the need to apologize for them. A weak apology starts with 'sorry if' or hides behind passive phrases such as 'mistakes were made'. A good one is short, specific and free of excuses. It names what went wrong, acknowledges the effect on the other person and says what will change.
Timing matters. An apology that arrives quickly shows that the person is taking the matter seriously, while one that arrives after weeks looks like damage control. It also helps to apologize in the same form as the mistake: an error made in a public message deserves a public correction, not a private whisper.
The usual fear is that admitting fault will weaken one's position. In practice the opposite is often true. Colleagues tend to trust people who own up early, since they know that problems will be reported while they are still small. A clear apology is therefore not a concession but an investment in future credibility.