The Schoenfeld Residuals Test is used to test the independence between residuals and time and hence is used to test the proportional Hazard assumption in Cox Model.
One of key assumptions in the Cox Proportional Hazard model is that of proportional hazards. According to proportional hazard condition, the covariates are multiplicatively related to the hazard i.e. in a regression type setting the survival distributions should have hazard functions that are proportional over time. In simple words hazard for any individual is a fixed proportion of hazard for any other individual.
The Schoenfeld Residuals Test is analogous to testing whether the slope of scaled residuals on time is zero or not. If the slope is not zero then the proportional hazard assumption has been violated. In this test, there is separate residual for each individual for each covariate, and the covariate value for individuals that failed minus its expected value is defined as Schoenfeld residuals. If the plot of Schoenfeld residuals against time shows a non-random pattern, the PH assumption has been violated. The residuals can be regressed against time to further test independence between residuals and time.