Cloning glitches are glitches in the Pokémon games that enables a player to make an exact copy or "clone" of a Pokémon.
It really depends on your perspective. I don't consider it 'legit' but some players may, as it isn't a direct form of hacking or anything. However it is an abuse of a glitch, so it's not exactly a good thing to do.
Online trading communities like r/pokemontrades ban trading cloned Pokemon under the heading that they are not legitimate. The game itself can't detect a cloned Pokemon unless it has illegal features.
You can't spot a cloned Pokemon really. This is due to it being a perfect replica of the original Pokemon - so as long as the original Pokemon was completely valid, and not hacked, the cloned one will be too.
The cloning glitch in Generation VI works much the same as the method in Generation I, by breaking off a trade between two nearby Nintendo 3DS systems connected via infrared connection. Depending on the timing, the first Pokémon may be cloned, the trade may complete, or the Pokémon will be erased. However, the chance of a Pokémon being erased is small and this method is not known to pose any harm to the player's save data. Most Pokémon will clone at about 3 seconds, although it has been observed that some held items impact the time taken to clone.
Bulbapedia