(M) is a lot of things like a letter in the alphabet, the evil (M) in Arthur and the Minimoys but if you have seen it on the PokemonDB or on any moveset then it usually states that the Pokemon us of a male gender
How is this done
- When you fix a Pokemon's gender to male on Showdown, the gender will no longer be chosen randomly but will always be male (M). When you copy paste the team or the Pokemon to use it as an example or to use it for an rmt, it will usually have the symbol (F) female or (M) male depending on the gender you set it on
Some Pokemon have fixed genders (Latias (F), Latios (M) etc..) and they will automatically have their respective symbols
I don't know if this is what you mean but it could surely be the (M) you have been seeing