Whether an Xbox controller requires a battery depends on its model and configuration.
Xbox Adaptive Controller
The Xbox Adaptive Controller has an internal rechargeable battery and does not require the use of AA batteries. When the battery level is low, the battery indicator light on the front of the controller will turn pure orange. It can be charged using a USB-C cable or an AC adapter. When using a USB-C cable, plug one end into the USB-C power port on the back of the controller and the other end into the Xbox console or computer; When using an AC adapter, plug it into the DC power port on the back of the controller and plug it into a wall socket. After the controller is fully charged, the indicator light will light up in pure white.
Original Xbox One controller
The original Xbox One controller can be powered by a data cable, so it can be used without a battery when connected to a console or computer. If you need to use the Xbox controller on a PC, you can use the Xbox 360 wireless controller receiver to wirelessly use the Xbox 360 controller on the PC.
Other models of Xbox controllers
For other models of Xbox controllers, they are typically powered by AA batteries. For example, some controllers are powered by AA batteries, but there are also rechargeable battery packs available for selection.