Phase transitions in a quasi-one-dimensional surface system on a metal substrate are investigated as a function of temperature. Upon cooling the system shows a loss of long-range order, fluctuations, and a transition into an inhomogeneous ground state due to competition of local adsorbate-adsorbate interactions with an incommensurate charge density wave. This agrees with a general phase diagram for correlated systems and high-temperature superconductors. The model surface system allows direct imaging of the fluctuations and the glassy inhomogeneous ground state by scanning tunneling microscopy.