They are close synonyms.
When trying to understand small differences in similar words, a native speaker goes to an English dictionary, because this is exactly where dictionaries are helpful. I checked one, and found that definition 1b for "fix" is "to restore to proper condition or working order; repair." And definition 1a for "repair" is "to restore to sound condition after damage or repair; fix!"
Each word has some additional meanings, which are different for the two words, so the two words are not interchangeable. But if something is broken or does not work, you can "fix" it or "repair" it. There is no difference in meaning.
I believe that "repair" is at a slightly higher "register," slightly more formal, than "fix." For example, you would probably say "the surgeon repaired the hernia," not "the surgeon fixed the hernia."
Also, "repair" can be a-noun-used-as-an-adjective. You can take your car to a "repair shop," but there is no such thing as a "fix shop."