ive got two buttons and one led . if I press button 1 the LED should make red light. If i press button 2 the LED should make green light. If I dont press the button the led shouldnt make a light.
Right now, you could have hardware issues, software issues, or both.
Likely there are software issues. Please use the Tools + Auto Format function to straighten out the random indenting in your code, to make it easier to read.
Try a simple sketch that simply turns the two LEDs on. See if they both light up. If not, fix the LED wiring.
Then, another simple sketch that simply reads one switch state, and writes it to the serial monitor. Does the value change when you press the switch? Does it change back when you release the switch?
how the board know that pins1 should be button 1? thats what i dont understand
You connect the switch to some pin. Then, you tell the program that the pin is an input pin, using the pinMode() function, and you read the state of that pin, using the digitalRead() function. Both of these functions have, as the first argument, the pin number.
That is how the board knows which pin goes with which switch or which LED. You tell it.