To make it simple I'd say markup is about structure where code has inherent meaning.
For example:
<p>The quick brown fox jumps over the lazy dog.</p>
Here the markup does not change the fact that the dog is lazy. That is the markup does not give meaning to the sentence.
But with code, the meaning is "coded" in to the text. Lazy could be code for yellow, which in that case changes the meaning of the sentence.