A battery produces a constant potential difference through chemical reactions. Electric current is the rate of flow of electric charge. Resistance is the ratio of voltage to current and determines how current flows in a circuit. Power in a circuit is determined by the current and voltage, with alternating current varying sinusoidally over time.