AlgorithmAlgorithm and Codecode are different, but related things. The relationship is simple: CodeCode expresses Algorithmsalgorithms.
The same algorithm could be expressed in different languages, including natural language, some form of pseudo-codepseudocode, machine language and programming languages. Barring natural language and pseudo-codepseudocode, we refer to these representations as code (source code if it is not machine language).
In fact, translating from some languages to others is possible and done routinely from programming languages to machine language, or from a programming language to another. Sometimes from machine language back to a programming language. This evidences that the same algorithm can be expressed in multiple languages, which results in different but equivalent code.
I'm saying that code is more concrete that algorithms. Algorithms are ideas, and we can use code to portray them, study them, compare them, talk about them. Or have a computer execute them.
when something goes from being an algorithm to being code?
Algorithms can exist before being portrayed (in code, for example). That is to say, you can figure out how to do something before writing it down. It is the expression that makes it code.