Arduino/Genuino Uno Board Not Working

The following is my code:

void setup () {
  pinMode(2, INPUT);
  pinMode(3, OUTPUT);
}
void loop () {
  if (digitalRead(2) == LOW); {
    digitalWrite(3, LOW);
  }
  if (digitalRead(2) == HIGH); {
    digitalWrite(3, HIGH);
    delay(500);
    digitalWrite(3, LOW);
    delay(500);
  }
}

The following is my error message:

Board at COM3 is not available
or
Problem Uploading to Board

I'm not entirely sure what this means. I'm new to Arduino and haven't even gotten a project to properly work yet, even after copying the example code. Any help would be much appreciated.

What does Windows device manager say when you connect the board? Is it indeed COM3? No yellow triangle indicating a problem with it?

Did it work before?

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Bob.