How to deactivate a button when another one is activated?

If, for example, “Button-A” is currently active and I click on “Button-B”, then I want "Button-A" to go back to its inactive state. What would be the best way to proceed here?