You need to get rid of the mold and you may want to remove the top layer of kraut, if it came in contact with the mold, otherwise it should be fine.
It's not a big deal. Just wipe the inside of the jar clean as best you can, and then wipe it with some vinegar. The acetic acid in the vinegar will kill any mold spores and the vinegar won't hurt the kraut.
With certain types of crocks, you need to skim the scum off the top daily, or it will grow mold.
If you don't skim the scum off the top daily, it can grow mold.
If you're going to keep making kraut you may want to get either a pot with a water trough or one of the new jar lids that prevent air from getting in, but lets gasses escape. This also helps to prevent mold.