It's my turn I have priority I control a Martial Law ... I detain my opponents Zacama, Primal Calamity ... My spell goes into the stack then I pass priority to my opponent. He uses Zacama's ability to destroy target enchantment in this case my Martial Law. His spell goes into the stack over mine he then passes priority back to me I have nothing else to do and the spells resolves. If both spell resolves this means my enchantments gets destroyed and his Zacama is detained? Or my enchantment survives because he can't active his activated abilities? Sorry still trying to understand the stack! I know his spell resolves first does that means he destroys my enchantment and is not detained?
Your enchantment will be destroyed, then their creature will be detained.
That happens because, as you guessed, their creature only becomes detained after Martial Law's trigger resolves. Since it's been placed on the stack, and your opponent had priority before it resolved, they can use Zacama's abilities normally. That goes into the stack, and resolves before your triggered ability. Your enchantment will be destroyed, and then its trigger will resolve normally and detain their creature until your next turn.