The most likely culprit when text acquires an unwanted style is the "Define styles based on your formatting" setting at
File | Options | Proofing | AutoCorrect Options | AutoFormat As You Type. If you have that option enabled, disable it at once! If it turns out that that was the cause, then at least you won't experience the problem in future.
As for repairing the document, if Style C has been consistently applied to
either Style A or Style B, and if Style C is not used intentionally anywhere in the document, then you can reapply the correct style either using
Replace (searching for Style C and replacing with Style A or B) or using
Find In (or Select All x Instances if that option is available in the
Style pane) to select all the instances of Style C and apply Style A or B as appropriate.
If Style C has been applied to some paragraphs of both Style A and Style B,
or if Style C is legitimately used elsewhere in the document, then you'll need to use
Find to search for Style C, stepping through the document one instance at a time and reapplying Style A or Style B (from the
Style pane or Quick Styles gallery) as appropriate.