A blogger called Eric has written up a simple piece of code, and an accompanying Fritzing circuit diagram, of how to read a switch input and turn an LED on and off. It’s a simple example, but does show you how simply this kind of thing can be done. Read it here. Don’t worry if you’ve got a model B, by the way, you can just use different pins to do the same thing as on the B+/Pi 2.