Nesting loops - if statement in a while loop
I guess you want the while loop to exit, when the switch goes to HIGH. (You didn't explain this in your question)

Currently the variable switchS cannot ever change while the code is in the while loop. The variable var only changes, when switchS is HIGH. So, if switchS is LOW at the start of the while loop, you have an infinite loop.

Instead, you can actually read the switch state inside the while loop, not outside of it. The variable switchS will not automatically track the state of the switch. You have to explicitly read it. Like this variant of your code:

int switchS = 0;
int var = 1;   

void setup() {
    pinMode(1,INPUT);
    pinMode(7,OUTPUT);
    digitalWrite(7,LOW);
}

void loop() {    
    while(var == 1)  
    {  
        digitalWrite(7,HIGH);  
        delay(100);  
        digitalWrite(7,LOW);  
        delay(100);
        switchS = digitalRead(1);  // I moved this line in the while loop, to read the switch on every loop iteration
        if(switchS == HIGH)  
        {  
            var = 0;  
        }  
    }  
    delay(5000);  
    var = 1;
}




Note: You are using pin 1 as input pin. On the Uno this is a Serial (UART) pin, which is used to communicate with the PC. If you have enough pins, that are free, you should not use pins 0 and 1, so that you don't block the serial communication, unless you really need it and know, what you are doing.