Swampert is my favorite Pokémon of all time, I started playing Pokémon when Emerald came out, and I chose water because I didn't understand that my rival would choose a the starter that would be strong against me (I figured she would use Torchic like in the anime). However, Swampert had been a real powerhouse! Also Mudkip is the cutest water-type in my opinion, and Marshtomp doesn't look half bad for a middle stage starter which are historically rather awkward-looking. Swampert's regular and Mega form are both in UU, which is a solid tier, but I will be talking about VGC here. The Ground typing is a godsend, as Thunder Wave will fail against Swampert. Normal Swampert works well with a special set, with Scald, Ice Beam, and Earth Power as attacks, and Wide Guard as a neat defensive move. Scald destroys Primal Groudon when its ability isn't active, and also has a nifty chance to burn other things like Mawile and Kangaskhan. Ice Beam targets down Landorus-T, Mega Salamence, Mega Ray without Delta Stream, and Thundurus-I, the former three not being able to withstand Ice attacks from a base 85 special attacker, and the latter not being able to really strike back with big damage without Grass Knot or HP Grass and taking super-effective damage from Ice Beam. Earth Power deals nice chunks to Dialga, Bronzong that have used Gravity, Primal Groudon when you can't get rid of Desolate Land, Mega Mawile, and Mega Gengar. This Swampert never has to worry about Intimidate nor burns due to being special, and still deals good damage back. Wide Guard is useful to stop powerful spread attacks such as +2 Fairy Aura Dazzling Gleam, Precipice Blades, Origin Pulse, Water Spout, Eruption, and Dark Aura Snarl, as well as Icy Wind from Cresselia and the like. You can also use HP Fire for a solution to Ferrothorn. Swampert also does well on a Double Primal Trick Room Gravity team, being able to run Relaxed with Assault Vest to outspeed a ton in Trick Room. Hammer Arm can be used here to counter Dialga, Smeargle, and Mega Kang as well as continue lowering Swampert's speed to make it even faster in Trick Room. Either Waterfall or Scald can be chosen here, Waterfall having a nice chance to flinch, especially under Trick Room, and Scald being able to get some burns onto the other team. Earth Power is necessary, as Earthquake will hurt your own partner, and hits even more than before with Gravity up. Ice Punch or Ice Beam can be chosen, as Ice Punch has more power behind it due to swampert's higher base attack, but Ice Beam can be chosen if you fear Intimidate. Rock Slide is another good option for some decent spread damage on Flying types, especially nailing Talonflame. Stone Edge works similarly, but only target one opponent. If Assault Vest isn't your cup of tea, Rocky Helmet can be considered to negate Focus Sashes of some Fake Out users like Weavile. It this is the case, Swampert does get some decent status moves like the aforementioned Wide Guard, Yawn, and Roar. Swampert is rather versatile and is a nice teammate to consider. However, its ability leaves something to be desired. Damp can stop Landorus from going boom, while Torrent works when you only have a little health left to power up your water-STAB.
Mega Swampert is a rather risky pick, as it is a HUGE threat with Primordial Sea up, but rather underwhelming without that speed boost. It can also be use on a Trick Room team along with Hammer Arm, but if the opponent switches in Kyogre, then what? Mega Swampert also cannot take an Intimidate well, as its stats make it a prime physical attacker, which suffers from burns as well (Will-O-Wisp is the only Fire-type moves that still works in Primordial Sea), though it does get Refresh, it eats up a moveslot that can be used for attacking. Earthquake is the strongest Ground move Swampert has, but won't work without hurting your partner, which has to be Kyogre to keep Swift Swim active. You can switch it out for a Flying type, but there is the fear of Gravity these days, plus switching out Kyogre will deactivate Mega Swampert's ability. As much as I love Swampert, don't use its Mega form in VGC, save that slot for Kangaskhan or Salamence I say.