A sine wave or square wave oscillator is usually used to convert the battery's DC voltage to a higher frequency. When using high frequency SMPS led light drivers, you can use PWM or PFM controller to turn on and off MOSFET, power transistor or thyristor.
Pulse frequency modulation (PFM) adjusts the variable switching frequency to control the number of times the device is turned on and off per second. Usually used for square wave switching signals. Compared with sine waves, it is easier to filter and adjust.