There are enough Skills available for each class to Stun opponents:
Fire Stuns opponents in all available variations: it is either fiery aura of a small radius around the player (Normal usage) or it is a long fiery trail (Backwards usage) or it is a big explosion that Stuns everyone around in a certain radius (Charged usage);
Shot Stuns opponents when hits them (which does not always happen and depends on how well it is used) in all available variations;
Cloak only Stuns opponents in its Charged version by creating an explosion upon getting out of the invisibility state;
Bomb Stuns opponents in all available variations: Bombs are either thrown right ahead (Normal usage) or left on the road behind (Backwards usage) or thrown further ahead (Charged usage), and whenever a rival touches them, the bombs explode causing everyone in the explosion radius to get Stunned;
Shield only Stuns opponents in its Charged version as it creates a red circle around the player which attacks and Stuns those who get close enough to touch it.
Each Racer has a personalized, or Unique, ability that is made to reflect their personality or be a reference to their original Disney/Pixar prototype. All Unique Skills have Normal and Charged versions which are sometimes similar in their effect but often very different. Most (but not all) Unique abilities have an option to Stun rivals, and here are some examples:
Enchanted Mirror: Belle creates an illusion of furniture in the middle of the road by using her Enchanted Mirror. She can drive through it easily, however, whoever else touches it gets Stunned. This furniture is often hard to avoid due to it taking space across the whole road.
Bare Necessities: Baloo leaves rotten fruits on the road behind him, and they act like the Backwards usage of Bomb: whoever touches them gets Stunned, however, unlike Bomb, they do not blow up therefore it affects only one player.
One of the Pack: Mowgli summons wolves that run ahead of him and Stun everyone on their way, letting the player overtake a lot of rivals at once.
Olympian Flyby: Hercules summons Pegasus to speed himself up, however, the Charged version of the skill makes Pegasus' path aggressive towards opponents, and whoever touches the red line gets Stunned. This skill is very similar to the Backwards usage of Fire.
Why I oughta...: grumpy Donald starts punching everyone around him in a small radius which Stuns everyone who happens to be too close (whether ahead or behind or on the side), which is similar to the Normal version of Fire.
Dash or Side bump is Brawlers' favorite trick to take advantage in a race. It is performed by pressing the dash buttons while driving next to a rival, the attacker's car bumps into a rival car on the right or on the left which causes them to take a serious hit, instantly stop, and, depending on the speed (though in most cases) have their car turned around in process. Gaining speed after such an impact is not an easy task as they have to accelerate from 0 speed again, which gives the attacker enough time to drive ahead and overtake the victim.
Speedsters can arguably use this mechanics for the same purpose as well, however, they just push the rivals aside without actually Stunning (stopping) them.
How to defend yourself from getting Stunned
The easiest answer would to be to just avoid any possible cases described above. However, it is not as easy, which is why here is a list of skills that can save players from getting Stunned.
Defense: Common Skills
Cloak is the most protective solution for anything: if nobody can see you, nobody can attack you!
Shield's Normal version protects a player from 1 hit, and, if you are a Defender, you have an unlimited number of Shields that you can get by dashing into others!
Rush is a less obvious choice when it comes to defense, however, if timed well and used just before getting hit by things like Shot or Bomb, the push forward it gives can save you from these attacks by making you evade them.
Defense: Unique Skills
Most Racers (not all) have a variation of their Unique ability that can somehow protect them from impact. Sometimes their description explicitly says "become Intangible/Invulnerable for a period of time", however, in other cases it is possible to protect yourself by attacking others. Nobody can touch you if you touch them first, right? :)
Here are some examples:
Trailblazer: the Charged version of this skill makes Mickey Invulnerable and even leaves a trail for others to become Invulnerable as well.
Grecian Burn: the Charged version of this skill makes Meg Intangible which protects her from any impact in a way similar to Cloak.
Jade Captain's Knot: the skill itself does not provide protection per se, however, using any version of this ability allows Elizabeth to push everyone away which makes it very hard for opponents to get close enough to Stun her.
Fearsome Roar: the skill is meant for attacking others rather than protecting yourself, however, the Roar stuns everyone around in a certain radius which makes them unable to Stun Sulley for a tiny period of Stun duration.