A current-core flux-rope model for interplanetary magnetic clouds is presented which explains their average thermodynamic and magnetic properties. It is assumed that during a magnetic cloud's evolution, its total magnetic helicity, flux and mass are conserved and that the dynamics of a cloud is governed by the Lorentz self-force acting on its curved portions. Total magnetic energy and current in a magnetic cloud decrease monotonically as it elongates. Part of this magnetic energy is lost in overcoming solar gravity, part goes into the bulk kinetic energy, and the rest can be assumed to go into heating the plasma inside the cloud. Due to this dissipation of magnetic energy as heat, the temperature of an expanding cloud goes through a maximum before the cloud leaves the corona. The temperature may reach 1.7 × 106 K. As a cloud expands into interplanetary space, the total plasma beta asymptotically approaches a constant value between 0.39 and 0.52, irrespective of its initial value. Apart from explaining the heating and expansion of magnetic clouds, this model also provides expressions (scaling laws) for the magnetic field strength, temperature, radius, density, asymmetry of the magnetic field strength profile, slope of the plasma velocity profile inside clouds, and plasma beta, as functions of distance from the Sun. These theoretical results are compared with cloud data obtained between 0.3 and 4 AU from the Sun. The comparisons show a good agreement between observation and theory.