The rules you set up in Mail will only apply in the Mail. They are all local, so they also won't transfer to another device running Mail. However, if you use the same client on multiple devices AND set up the same rules on all those clients, you'll have the same behavior among all the devices
Your rules will actually move items in G Mail (and I think in iCloud accounts).