Bosses are a Mega wild Pokemon, they have a big amount of health and when the player faints, the health doesn’t reset so you can keep attacking it.
When a Boss spawns it will be announced in an events channel, so a lot of people will come to try to kill it. The trick is to do the last hit on it, and the higher the damage your Pokemon does to it the higher the chance that you will kill it.
If you do the last hit on a Boss and it dies from you, you get a lot of XP and gold + a Master Ball. This is currently the only way to get Master Balls.
A Master Ball can be used for catching Pokemon, or for buying a Mega Evolution for your Pokemon.
How To Find Bosses
Bosses have a chance to spawn instead of a Pokemon that has a Mega Evolution, so the best thing to do is finding a location with lots of Pokemon that has a Mega and spawning there until a Boss spawns. To see the spawns in the location you are in, type !location.
A good location for spawning Bosses is number 57 in the Kalos region, only Lucario spawn there so a Boss always have a chance to spawn (Since Lucario has a Mega Evolution).
Buying And Using A Mega Evolution On Your Pokemon
Once you have a Master Ball from beating a Boss, type !shop 1 to see that to buy a Mega Stone for one of your Pokemon you need to type !buy 112 [Pokemon Number] [Mega Variant 1 for X, 2 for Y] – Example: !buy 112 10 1 – That will cost you 1 Master Ball and 12,000 gold.
After you buy a Mega Stone for your Pokemon you can do !mega – which will activate and deactivate your Pokemon’s Mega Evolution.
Mega Evolution boosts the Pokemon’s stats and sometimes changes the types of it, you can find more info and a list of Pokemon with a Mega Evolution here: https://bulbapedia.bulbagarden.net/wiki/Mega_Evolution.