Depends on the issue and if it is something you can take reasonable steps with outside of going to HR. By doing so, you are saying that the problem is now larger than just you and the coworker; it is, or should be, the company’s problem that this behavior is happening. To them, that means either some policy is being violated or your work is dramatically suffering as a result of someone else’s behavior.