CASTEP employs several electronic solvers. The default solver uses a density mixing (DM) algorithm in which the Kohn-Sham equations are solved for a fixed input density, and then a separate density mixing algorithm is used to evolve the density towards the groundstate.
For difficult to converge systems Ensemble Density Functional Theory (EDFT) can be used; this method is extremely robust, but much more computationally demanding than density mixing methods.
For more information on electronic solvers in CASTEP see the following talks from recent Castep workshops: