arduino noob

i am trying to write a program that when a switch is off and a button is pressed a red LED come on and when the witch is on and a button is pressed the red led goes off and a green one comes on. can anyone give me some pointers on where to look to try and figure out how to write this code? i want there to be more in the code in the future but this will be a start.

thanks.

The digitalRead() and digitalWrite() functions are all that you need.

Of course, your requirements may be be properly stated, and what you really mean is that when a button BECOMES pressed, you want to change the state of the pin that the LED is connected to.

It also isn't clear why you have a switch and a button. Generally, having two switches will work better, even if one of them is a push-button switch.