One inch is exactly 2.54 cm and one foot is 12 inches. Everything else follows from those two facts.
Two steps
Divide centimetres by 2.54 to get total inches. Divide by 12: the whole number is feet, the remainder is inches. Example: 170 ÷ 2.54 = 66.9 inches = 5 feet 6.9 inches.
Going the other way
Multiply feet by 12, add the inches, then multiply by 2.54. Example: 5′ 4″ = 64 inches = 162.6 cm.
Watch the rounding
Round only at the end. Rounding 66.9 inches down to 66 before splitting turns 170 cm into 5′ 6″ — almost a full inch short.