Batería vs. pila
In Spanish, the words 'batería' and 'pila' are both used to refer to batteries, but they are used in different contexts.
Batería
'Batería' generally refers to rechargeable batteries, such as those found in electronic devices and vehicles.
La batería de mi teléfono está casi descargada.
(My phone's battery is almost dead.)
Compré una batería nueva para mi computadora portátil.
(I bought a new battery for my laptop.)
El coche eléctrico necesita recargar su batería.
(The electric car needs to recharge its battery.)
Pila
'Pila' is typically used for non-rechargeable batteries, like those used in remote controls, clocks, and small electronic devices.
La pila del control remoto está agotada.
(The battery of the remote control is depleted.)
Necesito comprar pilas nuevas para el reloj de pared.
(I need to buy new batteries for the wall clock.)
Las pilas AA se usan mucho en juguetes.
(AA batteries are frequently used in toys.)
Summary
In summary, 'batería' is commonly used to refer to rechargeable batteries found in larger devices like phones and laptops, while 'pila' usually refers to non-rechargeable batteries used in smaller devices like remote controls and clocks.