How is energy used in a circuit?​