How to use switch button ?

Hello. I would like to create a switch where I can alternate memberships showing from monthly to annualy. How can i do that?