The main case to understand is that of topologically trivial bundles, i.e. those of degree zero (and the other cases are a minor
technical extension of this case). This case of the Narasimhan–Seshadri theorem says that a degree zero holomorphic vector bundle over a Riemann surface is stable if and only if it comes from an irreducible unitary representation of the fundamental group of the Riemann surface.
Donaldson (1983) gave another proof using differential geometry, and showed that the stable vector bundles have an essentially unique unitary connection of constant (scalar) curvature. In the degree zero case, Donaldson's version of the theorem says that a degree zero holomorphic vector bundle over a Riemann surface is stable if and only if it admits a flat unitary connection compatible with its holomorphic structure. Then the fundamental group representation appearing in the original statement is just the monodromy representation of this flat unitary connection.