Pokemon GO is getting giant raid battles against powerful Pokemon, gym badges, and a few other new features in updates that will roll out over the next few weeks. The first feature to get implemented is an overhaul of the way that Gyms work, which will include the ability to obtain items at Gyms just like one would at a PokeStop. The implementation of these features will require Gyms to be shut down for a little while, so if you happen across an open Gym, you likely have the new Gym features. Raid bosses will come a bit later, and will pit super-powered Pokemon against groups of trainers.
Gyms will be able to function as Pokestops, and will no longer work on a prestige system. Six slots can be filled by the opposing team, regardless of prestige. Each of these slots has to be filled by a unique Pokemon type, so prank Gyms filled with Magikarp and monster Gyms fully staffed by Gyarados are both a thing of the past. The Pokemon at the Gym all have a unique motivation gauge. Motivation decreases over time and with successive defeats, and CP decreases with it. Motivation can be increased by giving a Pokemon berries. When a Pokemon loses all of its motivation, its next loss will send it back to its trainer. Gym Badges are now on board, and though they won't allow you to battle the Elite 4, they will level up with Gym interactions such as wins, feeding berries, and spinning a Gym's disc, and can help get better items from a particular Gym and better rewards for victories.
Raid battles will work differently, and will be rolling out slowly over the next few weeks. A raid boss will be a powerful, giant Pokemon with CP in the tens of thousands. When a raid boss is set to appear at a gym, all the Pokemon there will be sent home, and a giant egg will appear, bearing a countdown. At zero, the raid boss will appear. In order to fight a raid boss you'll need to win a raid pass from a gym, which can be done once per day, or you can buy raid passes. A team of up to 21 trainers can work together to chip away at a raid boss. If the team takes down the raid boss within five minutes of the battle starting each person who fought will have a chance to catch a Pokemon of the same type as the raid boss. While this one won't be vastly more powerful than a normal Pokemon, raid bosses will tend to be rare and powerful Pokemon types. Regardless of the time frame for defeat, raid bosses will give out unique new items as loot. A Rare Candy will turn into any Pokemon's candy when used on them, a Golden Razz Berry will increase the chances of a successful catch far beyond normal, and Technical Machines can teach your Pokemon a new move, and come in fast and charged varieties.