Hi Penny, i agree with Dani's answer here. Sometimes it can also be used interchangeably, but one fits better than the other. I will give you some example to help you get the idea.
*Can you replace me this Monday?
Bisakah kamu menggantikanku Senin ini?
*I think i need to change my phone number.
Aku rasa aku perlu mengganti nomer teleponku. (in this case you will replace the old number with a new one, right?)
*Chameleon changes it's color.
Bunglon mengubah warnanya. (the old color is still there, just not visible. But sometimes you would hear people use "mengganti warnanya" too, it's not wrong but i think "mengubah" fits better in this context)
*I have to replace the broken window.
Aku harus mengganti jendela yang rusak.
*She always change her mind.
Dia selalu berubah pikiran.
*He changes clothes every 3 hours.
Dia berganti pakaian tiap 3 jam.
*I changed my hair.
Aku mengubah rambutku. (note that your hair is still there hahaha most indonesian will say "ganti rambut" but this expression refers to the idea of replacing the old haircut/haircolor with the new one)
What I've noticed after writing these examples is, whenever you use "to replace" in english you will always use "mengganti". But here comes the problem with the word "to change", it could mean "mengubah" or sometimes "mengganti" depending on the context. Maybe you can try to replace the word "to change" with "to replace" in english, if that makes sense then maybe you would use "mengganti" as well. I hope this helps! Btw, i noticed that in colloquial indonesian we use "ganti" more.