Best I can tell, AP guesses based on your pace. And it's pretty accurate too. But when it says I was orienteering and in fact I was running, I feel the shame.
I don't doubt that it uses pace, but I suspect there's more to it than that.
I rarely punch when I orienteer; but AP gets it right every time.
But I do, so it's possible that it could use it as a clue in my case. What I'm really impressed by is that it does categorization on entirely user-defined categories.
Possible, but I doubt it.
It has a threshold too. I do orienteering much more than I do hiking, and it always guesses orienteering, even though they are a similar pace. For me, it basically chooses (very accurately) between my four most common activities (in decreasing pace); cycling, road run, trail run, orienteering.