A battery in electrical circuits serves as a **source of electrical energy**. It provides the **potential difference** (or voltage) that drives the flow of electric current through the circuit. Here's a breakdown of its function:
1. **Energy Storage**: A battery stores chemical energy inside it. This energy is released when the battery is connected to a circuit.
2. **Voltage Source**: The battery creates a voltage between its positive and negative terminals. This voltage is what pushes the electrons through the circuit, causing an electric current.
3. **Current Flow**: When connected in a circuit, the battery allows current to flow from its negative terminal (where electrons leave) through the circuit, and back to its positive terminal (where electrons return after doing work, like lighting a bulb).
4. **Power Supply**: Depending on the battery's voltage and capacity, it can supply power to a wide range of devices, from small electronics to large machines.
In summary, a battery provides the electrical energy needed for devices in a circuit to function by creating a potential difference that pushes electric current.