Thanks for all of you for your good answers.
Now iam able to uinderstand what happens exactly.
But i have a small doubt.
Index rebuild means it will drops the existing one and creates new one.
In this situation what happens exactly (abt memory and pages wise and the actual process)