Algorithm and Code are different but related things. The relationship is simple: Code expresses Algorithms.
The same algorithm could be expressed in different languages, including natural language, some form of pseudo-code, machine language and programming languages. Baring natural language and pseudo-code, 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 form 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 do to something before writing it down. It is the expression what makes it code.