There are two kinds of stairlifts. Some run on regular AC power and some run off batteries (of course the batteries are charged by your regular household AC power).
It used to be that the AC power lifts were the most popular stair elevators, but the big advantage of battery powered stairlifts is that they still work even when the power goes out. As I’m sure you can imagine, this is a pretty valuable feature. Not only will you not get stuck in the middle of the stairs during a sudden outage, but you can use your lift many more times during the outage. Some manufacturers say their chairs can make 30 round trips without recharging.
A battery operated electric stairlift has a battery operated motor under the chair that drives the lift up and down the staircase.
At each end of the rail, there’s an electrical connection that charges the battery while the stairlift is idle. This way the stairlift is always ready to go.
Some manufacturers have a cable that connects the chair to the charging source so it’s always plugged in and charging. The problem with this is that the trailing cable can get tangled. (Doesn’t happen often, but it’s a possibility.)
The best stairlifts have a continuous charging strip inside the rail so the lift gets charged no matter where on the rail you park it.