When a Pokemon Mega Evolves, it will always have 100 stat points added to its BST (base stat total). Points can be added to any stat besides HP. In addition, the Pokemon's ability and typing have the potential to change, although this is not always the case. The moveset does not change.
Now, Mega Evolving is not necessarily an advantage. While most Mega Evolutions are strong in competitive due to the extra stat points, this is not because it is a Mega Evolution- it is ultimately up to the typing, ability and stat distribution of the Mega, as well as the movepool of the original Pokemon. In other words, Mega Evolutions are not strong simply because they are Mega Evolutions- they are usually strong because of their well distributed stats and useful abilities and typings.
An example of this is Mega Lucario vs Mega Banette. Mega Banette has a subpar defensive and offensive typing in Ghost. While its stats point to an offensive Pokemon, its movepool and ability are more suited for a support Pokemon, so it cannot fill either role effectively. While it does have a great Attack stat, its other stats are mediocre and leave it unable to utilize this. Furthermore, its movepool is shallow and does not even provide it with a good STAB move. Meanwhile, Lucario has an amazing offensive and defensive typing in Fighting/Steel and an amazing ability for an offensive Pokemon. It has good offensive stats and a great movepool that provides it with powerful STABs and coverage.
The comparison of these Pokemon shows that Mega Evolutions are not strong just because they are Mega Evolutions, but because they usually have well distributed stats and good typing and abilities.