  Exoplanets orbiting M dwarfs present a valuable opportunity for their
detection and atmospheric characterisation. This is evident from recent
inferences of H$_2$O in such atmospheres, including that of the habitable-zone
exoplanet K2-18b. With a bulk density between Earth and Neptune, K2-18b may be
expected to possess a H/He envelope. However, the extent of such an envelope
and the thermodynamic conditions of the interior remain unexplored. In the
present work, we investigate the atmospheric and interior properties of K2-18b
based on its bulk properties and its atmospheric transmission spectrum. We
constrain the atmosphere to be H$_2$-rich with a H$_2$O volume mixing ratio of
$0.02-14.8$%, consistent with previous studies, and find a depletion of CH$_4$
and NH$_3$, indicating chemical disequilibrium. We do not conclusively detect
clouds/hazes in the observable atmosphere. We use the bulk parameters and
retrieved atmospheric properties to constrain the internal structure and
thermodynamic conditions in the planet. The constraints on the interior allow
multiple scenarios between rocky worlds with massive H/He envelopes and water
worlds with thin envelopes. We constrain the mass fraction of the H/He envelope
to be $\lesssim 6$%; spanning $\lesssim 10^{-5}$ for a predominantly water
world to $\sim6$% for a pure iron interior. The thermodynamic conditions at the
surface of the H$_2$O layer range from the super-critical to liquid phases,
with a range of solutions allowing for habitable conditions on K2-18b. Our
results demonstrate that the potential for habitable conditions is not
necessarily restricted to Earth-like rocky exoplanets.
