Fermi-level is strongly dependent on carrier density and hence defines the material type. Because carrier density alters Fermi-level, it approaches to conduction band (valance band) by doping donor (acceptor) atoms which increase electron (hole) concentration.