It looks for small (pixel level) high contrast details and also looks for edges. Moire is likely to occur in the areas that have small high contrast details that aren’t edges.
Edit: And if there are a lot of those feature in one area it is probably moire.
Yes. That’s why detecting moire is tricky. You have to be precise in what you determine to be high contrast details and what is an edge. For example, I use a method for detecting details that is biased towards differences along diagonals.