Mathematics is built out of arguments. These are normally logical arguments, sequences of things which we say are true. We know they’re true because either they start from something we assume to be true or because they follow from logical deduction from things we assumed were true. Even calculations are a string of arguments. We start out with an expression we’re interested in, and do things which change the way it looks but which we can prove don’t change whether it’s true.
A fallacy is an argument that isn’t deductively sound. By deductively sound we mean that the premises we start with are true, and the reasoning we follow obeys the rules of deductive logic (omitted for clarity). if we’ve done that, then the conclusion at the end of the reasoning is — and must be — true.