The Mega Gauge appears on the side (or on top in Mobile) of the board during a stage, indicating the progress of Mega Evolution. Matching icons of the Mega Evolving Pokémon increases the gauge. Mega Boost Skills also increase the gauge. Different Pokémon require different amounts of icons to Mega Evolve, but they can be decreased by using Mega Speedups.
Here is a table showing the number of icons needed for each Mega Evolving Pokémon and the max number of Mega Speedups that can be used on them: