Okay so, I know I already posted an answer for this, but surprise! Mega Evolution was released in September! so now I'll re-answer with the more up-to-date information.
During the initial release of Mega Evolution, the raid tiers changed. Before it was tier 1 to 5, 5 being legendary, but now it's 1, 3, 5 and Mega. To get Mega energy, which is necessary to Mega Evolve your Pokémon, you need to fight in Mega Raids. Mega Raids usually require about 5-6 people to win. Upon completion, you can catch the Pokémon you fought and you will receive some Mega Energy.
To Mega Evolve once you have enough energy for the specified Pokémon, you go to the Pokémon's summary and press "Mega evolve". The mega evolution lasts for about 4 hours, but I once had it last for 12 for my Beedrill. It will tell you how long the Evolution will last. After Mega Evolving your Pokémon for the first time, It costs less to Mega Evolve them in the future.
Currently, the Pokemon that can Mega Evolve are Blastoise, Charizard, Venisaur, Pidgeot, Beedrill, and Houndoom, and they intend on slowly but surely releasing more in the future.