The concept and structure of the Simulation of Spectra (SOS) code is described starting with an introduction to the physics background of the project and the development of a simulation tool enabling the modeling of charge-exchange recombination spectroscopy (CXRS) and associated passive background spectra observed in hot fusion plasmas. The generic structure of the code implies its general applicability to any fusion device, the development is indeed based on over two decades of spectroscopic observations and validation of derived plasma data. Four main types of active spectra are addressed in SOS. The first type represents thermal low-Z impurity ions and the associated spectral background. The second type of spectra represent slowing-down high energy ions created from either thermo-nuclear fusion reactions or ions from injected high energy neutral beams. Two other modules are dedicated to CXRS spectra representing bulk plasma ions (H+, D+, or T+) and beam emission spectroscopy (BES) or Motional Stark Effect (MSE) spectrum appearing in the same spectral range. The main part of the paper describes the physics background for the underlying emission processes: active and passive CXRS emission, continuum radiation, edge line emission, halo and plume effect, or finally the charge exchange (CX) cross-section effects on line shapes. The description is summarized by modeling the fast ions emissions, e.g., either of the α particles of the fusion reaction or of the beam ions itself.