cantonal Taxes are paid in the canton you reside. Compensations are made to ensure that pension and health are covered by your cantonal authority.
Taxes are Municipal, cantonal and Federal.
Depending on your registered/primary residency, you will pay your municipal taxes. Most cantonal taxes are based on residency. But some are based on citizenship.
Federal taxes apply to all.