The purpose of this paper is to give a self-contained exposition of the Atiyah-Bott picture [2] for the Yang-Mills equation over Riemann surfaces with an emphasis on the analogy to finite dimensional geometric invariant theory. The main motivation is to provide a careful study of the semistable and unstable orbits: This includes the analogue of the Ness uniqueness theorem for Yang-Mills connections, the Kempf-Ness theorem, the Hilbert-Mumford criterion and a new proof of the moment-weight inequality following an approach outlined by Donaldson [16]. A central ingredient in our discussion is the Yang-Mills flow for which we assume longtime existence and convergence (see [26]). ∗Partially supported by the Swiss National Science Foundation Grant 156000.