The present invention relates to a method for obtaining liquid and gas hydrocarbons from solid organic compounds, to an apparatus and to auxiliary devices necessary for carrying out the method. In particular, the invention relates to a method for producing liquid and gas hydrocarbons, which comprises a step of homogenising the particle size, moisture and chemical composition of the processed materials. During the method, the processed materials and residues undergo three changes of state and are subjected to pressures of up to 250 atmospheres.