We discuss interacting, closed, bosonic and superstrings in thermal equilibrium at temperatures close to the Hagedorn temperature in flat space. We calculate S-matrix elements of the strings at the Hagedorn temperature and use them to construct a low-energy effective action for interacting strings near the Hagedorn temperature. We show, in particular, that the four-point amplitude of massless winding modes leads to a positive quartic interaction. Furthermore, the effective field theory has a generalized conformal structure, namely, it is conformally invariant when the temperature is assigned an appropriate scaling dimension. Then, we show that the equations of motion resulting from the effective action possess a winding-mode-condensate background solution above the Hagedorn temperature and present a worldsheet conformal field theory, similar to a Sine-Gordon theory, that corresponds to this solution. We find that the Hagedorn phase transition in our setup is second order, in contrast to a first-order transition that was found previously in different setups.