If you haven't already, look over and run the IDE examples: file/examples/digital/button, digitalinputpullup, debouncing, and stateChangeDetection. Take the time and effort to understand what is going on in these sketches, it's a lot of the foundation for further Arduino progress and learning.
Starting from where you, apparently, are you're not going to be able to just throw together a working program. It's a building block process. Understand the elementary principles (like state change detection) well enough to tweak the examples to your need, add in one new part at a time and make it play well with previous parts. Lather, rinse, repeat.