For a Pokémon to undergo Mega Evolution, it must have the appropriate stone at hand according to its type. The trainer also needs to be wearing the Mega Ring so that both conditions might meet to make the Pokémon Evolve. Once both these things are done, you can select the option from the battle to trigger your Pokémon's Evolution.