Hello, there! "Trocar" is like to exchange. You can exchange (trocar) objects. "Trocar" is always for objects (in the Grammar, Formal). But in Informal you can use it like change. For example:
Nós precisamos trocar o telefone (Formal).
(We need to exchang the telephone). The telephone, the apparatus.
But we can use it like informal (slang). For example:
Vamos trocar uma ideia. (Slang/Informal). It means "let's talk". The meaning doesn't seem with "trocar" or "exchange".
"Mudar" is like change. In portuguese "mudar" is used in several situations. But its meaning is more next of modification/modify.
For example:
Nós precisamos mudar o telefone. (We need to change the telephone). In Portuguese, this seem that the telephone has proper life. Then, "mudar" is used for ideas, transformation. "Mudar" is used when you need change your life (mudar sua vida), or change the world (mudar o mundo).
There are other meanings for "mudar" and "trocar", but in this moment it's better to know only this.
In Portuguese, the secret of the verbs are in the "Accusative and Dative Cases".
I hope you understand.