What is the correct procedure to report typos or errors in journal articles?
If an error is grave enough to change the results, conclusions, meaning of a published article, the journal and probably also the author is keen to publish an errata to rectify the problem. If there is an error at a point but which is not carried through to the conclusions, I doubt an errata will result. Given that we cannot see the example you are referring to, it is impossible to asses the gravity of the problem. But, since you mention a typo, I doubt that the article as a whole is affected but rather a sentence or a paragraph. So at best you approach the grey-zone.

So, it would never hurt to write a short mail to the editor to check if the problem is deemed serious enough for action. Depending on how you perceive the problem, a mail to the author to check that your perception of the error is correct may also be pertinent. Which action you take first is of less importance, you may even decide to send a mail to both at the same time. Without knowing the details the best or most appropriate way forward in detail is difficult to judge.