How do I change value of a boolean field on a node when a user clicks a button?
There is a ready contrib module: Wishlist.


  Other site users can indicate their interest in purchasing an item from a wishlist. When that happens, everybody can see that somebody purchased the item and duplicated gifts are eliminated (or reduced - the wishlist module does rely on people playing nicely together). 


If you just want the job done, that's your way to go. If you want to learn, read about node_save() and Form API.