For photoelectric effect, changing the frequency of illuminating light means changing the quantum in which energy is delivered to the metal. Blue light delivers photons that pack more energy each compared to red light.
Photoelectric effect is the interaction between one electron and one photon. This explains why the higher the photon energy, the more energetic the ejected photoelectron. It also explains why there is a threshold frequency below which photoelectric effect cannot occur.