Repack will sample side chain orientations while keeping the backbone fixed in order to find an energetic minima. Running Repack will affect the entire protein. This can be individually by clicking Repack, but is also done during all other Actions that involve minimization of protein structure energy.
Side chain positions are sampled from a library of rigid-body orientations that are known to be energetically favorable and their frequency has been statistically calculated in the PDB. Each discrete side chain conformation in the library is referred to as a rotamer. The rotamer library lists each rotamer’s PDB frequency, its mean torsion angles, and standard deviations as a function of the backbone dihedral angles. It sets this on a bell curve in order to make minimization calculations possible (which require a continuous function in order to get a first derivative). So for each backbone orientation, you can calculate how probabile each rotamer is.
Shapovalov, M.S., and Dunbrack, R.L., Jr. (2011). A smoothed backbone-dependent rotamer library for proteins derived from adaptive kernel density estimates and regressions. Structure, 19, 844-858.