1. Most take AA cells
Most controllers take two AA or two AAA cells, and the compartment says which. Some newer ones have a battery built in that cannot be changed at all.
2. Alkaline or rechargeable
Alkaline AAs give the most play time per set and cost the least. Low self-discharge rechargeable cells cost more up front but can be charged hundreds of times, so they work out over a year or two of use.
3. Change them in pairs
Two cells of different ages make the controller behave oddly, and one weak cell can make the whole thing misbehave. Fit two new cells of the same type together.
4. A controller that only works when you press harder
That usually means a tired cell making poor contact. Clean the contacts with a dry cloth before you blame the battery.
5. Turn it off when you are done
Many pads stay awake while the console is idle, and the cells keep draining overnight. The small switch on the top of the controller is there for a reason.