A battery converts chemical energy into electrical energy by a chemical reaction. Usually the chemicals are kept inside the battery. It is used in a circuit to power other components. A battery produces direct current (DC) electricity (electricity that flows in one direction, and does not switch back and forth).