We study the interplay between chip-firing games and potential theory on graphs, characterizing reduced divisors ($G$-parking functions) on graphs as the solution to an energy (or potential) minimization problem and providing an algorithm to efficiently compute reduced divisors. Applications include an "efficient bijective" proof of Kirchhoff's matrix-tree theorem and a new algorithm for finding random spanning trees. The running times of our algorithms are analyzed using potential theory, and w...