Mark as Junk in macOS and iOS Mail.app I am using the default mail app both from macOS and iOS. I use accounts from GMail and Microsoft Office 365. 

If I "Move to Junk" in macOS and iOS, what does actually happen? A few related questions:


Does Google or Microsoft know that I marked those messages as junk, or such information just remains within macOS or iOS? 
If it only remains within macOS or iOS, do they share information so that my experience in macOS and iOS are the same?
The simple answer is no to all.
Macos mail runs its own filters which do not affect the mail server even if the server is Apple's own iCloud.
So the rules on macos will not directly affect ios mail. If your mac is running and the rule moves it to the junk folder then ios will see it.
If you want one set of rules for all machines then mark the item as Junk using the Web interface on the server.
I think Microsoft clients talking to exchange servers do do what you suggest.
I don't exactly know if ios mail interacts with iCloud.