A malicious code can also be referred to as a malware. Things that can be a malicious code are, trojan horses and worms.
A malicious code is a type of malware that is almost always disguised. Such as the trojan horse as I mentioned above. Fun fact: one of the most common malicious attack is the MitB attack. (MitB stands for Man-in-the-browser.) Have a happy and safe Happy Thanksgiving!