troubleshhoting

hi im new here and i was looking on advice on my arduino board i have everything required for XP but when i come to upload a program or code it keeps saying this:

avrdude: stk500_getsync(): not in sync: resp=0x00

please help? also my code is for fadeing bulb is: int led = 9;
int brightness = 0;
int fadeAmount = 5;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
analogWrite(led, brightness);
brightness = brightness + fadeAmount;
if (brightness == 0 || brightness == 255) {
fadeAmount = -fadeAmount ;
}
delay(30);
}

(deleted)