A detailed radiative transfer analysis of the observed continuum and molecular line emission toward the deeply embedded young stellar object IRAS 16293-2422 is performed. Accurate molecular abundances and abundance changes with radius are presented. The continuum modelling is used to constrain the temperature and density distributions in the envelope, enabling quantitative estimates of various molecular abundances. The density structure is well described by a single power-law falling off as r-1.7, i.e., in the range of values predicted by infall models. A detailed analysis of the molecular line emission strengthens the adopted physical model and lends further support that parts of the circumstellar surroundings of IRAS 16293-2422 are in a state of collapse. The molecular excitation analysis reveals that the emission from some molecular species is well reproduced assuming a constant fractional abundance throughout the envelope. The abundances and isotope ratios are generally close to typical values found in cold molecular clouds in these cases, and there is a high degree of deuterium fractionation. There are, however, a number of notable exceptions. Lines covering a wide range of excitation conditions indicate for some molecules, e.g., H_2CO, CH_3OH, SO, SO_2 and OCS, a drastic increase in their abundances in the warm and dense inner region of the circumstellar envelope. The location at which this increase occurs is consistent with the radius at which ices are expected to thermally evaporate off the grains. In all, there is strong evidence for the presence of a ``hot core'' close to the protostar, whose physical properties are similar to those detected towards most high mass protostars except for a scaling factor. However, the small scale of the hot gas and the infalling nature of the envelope lead to very different chemical time scales between low mass and high mass hot cores, such that only very rapidly produced second-generation complex molecules can be formed in IRAS 16293-2422. Alternatively, the ices may be liberated due to grain-grain collisions in turbulent shear zones where the outflow interacts with the envelope. Higher angular resolution observations are needed to pinpoint the origin of the abundance enhancements and distinguish these two scenarios. The accurate molecular abundances presented for this low-mass protostar serve as a reference for comparison with other objects, in particular circumstellar disks and comets.