If clearing the air actually does clear the air, and if everything is resolved and there's no misunderstandings, then by all means, great, do it. Do it as quickly as you can.
Often, though, it's late in coming. If it's very much after the fact, even maybe years, we realize we said something so terrible to someone, then sometimes it's not the best thing to do, because it may open up the memory for the other person, who may have totally forgotten about it. So it does depend a lot on the timing involved, but by all means, when you say something wrong if you can immediately clear the air, that's great. That will work almost every time.
Sometimes apologizing for something we said wrong doesn't work. Sometimes the other person will still be angry. They won't believe your apology, they'll still believe what you said which was actually a mistake. What can you do? Sincerely apologize, but it's going to be their problem if they want to hold on to the original thing and not accept your apology. In these cases, you won't be able to clear the air. Thankfully that's rather infrequent, it does not happen that often, but it may happen more often if you delay in saying you're sorry. Usually, saying sorry very quickly, is going to solve the problem and clear the air.