"When are your office hours?"

This seems like an innocent question. You want to go see your professor, and want to check when they will be available. But it is typically an annoying question for a professor. Most professors have posted their office hours on their syllabus and on the class website. In addition, many of them also regularly mention them in class.

Asking this question shows you have put very little thought into meeting with the professor. Rather than asking this question, you should check the syllabus and class site to determine when these office hours are. If you want to verify that they will actually be in their office and available during that time, it would be much better to ask “I want to stop by to talk about (thing). Is (this day and time) a good time to stop by?” It shows you have put thought into this question and this meeting.