We present a detailed study of a model of close-packed dimers on the square lattice with an interaction between nearest-neighbor dimers. The interaction favors parallel alignment of dimers, resulting in a low-temperature crystalline phase. With large-scale Monte Carlo and Transfer Matrix calculations, we show that the crystal melts through a Kosterlitz-Thouless phase transition to give rise to a high-temperature critical phase, with algebraic decays of correlations functions with exponents that vary continuously with the temperature. We give a theoretical interpretation of these results by mapping the model to a Coulomb gas, whose coupling constant and associated exponents are calculated numerically with high precision. Introducing monomers is a marginal perturbation at the Kosterlitz-Thouless transition and gives rise to another critical line. We study this line numerically, showing that it is in the Ashkin-Teller universality class, and terminates in a tricritical point at finite temperature and monomer fugacity. In the course of this work, we also derive analytic results relevant to the non-interacting case of dimer coverings, including a Bethe Ansatz (at the free fermion point) analysis, a detailed discussion of the effective height model and a free field analysis of height fluctuations.