One kilogram per cubic metre is 0.001 grams per cubic centimetre. The factor of a thousand looks surprising for a pair that is metric on both sides, and it comes from the mass factor and the volume factor pulling in opposite directions.
About the units
Kilograms per cubic metre is the SI unit of density and the one every physics equation expects. Grams per cubic centimetre is the practical unit of chemistry and materials science, chosen because water sits at almost exactly 1 in it, which makes relative density readable at a glance. Both describe the same quantity, and the thousand-fold gap between them is the reason a density figure without units is meaningless: 7,850 and 7.85 are the same steel.
The exact factor
The derivation is worth writing out because the two factors partly cancel. A gram is 10⁻³ kg, and a cubic centimetre is 10⁻⁶ m³. Dividing gives 10⁻³ ÷ 10⁻⁶ = 10³, so 1 g/cm³ is 1,000 kg/m³. Reference values: water is 1,000 kg/m³ or 1.00 g/cm³; aluminium 2,700 or 2.70; steel 7,850 or 7.85; lead 11,340 or 11.34; and air at sea level 1.225 kg/m³, which is 0.001225 g/cm³ — the point at which the SI unit becomes far more readable.
Where you meet this conversion
Materials data sheets, which give density in one unit or the other depending on the field: metallurgy and polymers usually in g/cm³, structural and fluid engineering in kg/m³. Any calculation of mass from volume runs through this pair, and getting the factor of a thousand wrong produces an error that is obvious for a beam and invisible for a coating. Buoyancy, sedimentation and mixing calculations all need consistent units before anything else.