How can I read console input? (receife data from console)

English:

How can I read a console input into a variable (receife data from console with arduino uno)

Thank you.

German:

Ich finde einfach keinen weg wie ich eine Konsoleneingabe auslesen kann.
Ich möchte etwas eingeben welches dann in eine Variable kommt

Bitte um euere Hilfe!

Im voraus schon einmal danke.

See Serial input basics

int RELAY1=13;
void setup() 
{
  Serial.begin(9600);
  pinMode(RELAY1,OUTPUT);
}
void loop()
{
  int val = Serial.read() - '0';
  if (val == 1) { // test for command 1 then turn on LED
    //Serial.println("RELAY on");
    digitalWrite(RELAY1, LOW); // turn on LED
    Serial.println("led off");

  }
  else if (val == 0) // test for command 0 then turn off LED
  {
    // Serial.println("RELAY OFF");
    digitalWrite(RELAY1, HIGH); // turn off LED
    Serial.println("led ON");
  }
  Serial.println("Arduino program");
  delay(500);

}

I have added example code. With this code you can send 0&1 to turn On/OFF the LED