It depends. If you want the screen to stay on, even if there is no user interaction, then you should use PhoneWakeState.KeepAlive. A movie player for example needs to call it.
If you want to prevent the CPU from sleeping when the screen is off then call PartialLock. This is relevant for an app that needs to continue running in the background. You should do it together with a foreground service.