Boss Kills are a special case of Unintended Sprite Spawning via the stun glitch. This page will cover the basic technical facts that make this glitch possible. In speedruns it is most commonly seen in Groovy and Cookie Mountain. A boss kill is also possible in Yoshi's Island 1, though it does not save time, and tool-assisted runs can additionally do one in Valley of Bowser 4 by using 2 instances of the stun glitch. Additionally, Reznor spawns (as well as many other instances of the stun glitch) are possible, and can be done in Awesome in 96 exit runs to save time, but successfully beating a level with one is somewhat more complicated though the basic principles are similar.
The canonical, simplest example of a boss kill is in Groovy, as shown in this video. The steps behind this trick are explained in more detail below.
Video: Groovy Boss Kill Source: Sten
The first step in this trick is to perform a double-tongue glitch. To do this, Yoshi needs to release his tongue on the same frame that the game freezes due to a powerup (or, in principle, powerdown) animation. To accomplish this, X or Y must be pressed on the same frame that a powerup is collected. Normally this requires frame-perfect timing of the X/Y press, however, if the powerup is falling toward Mario (such as the case of a fire flower dropped from reserve), an alternate method is also possible, by pressing Y (or X) and B on the same frame, while the powerup is just above Mario's head. This requires pressing both buttons on the same frame, but the timing window is much more lenient to get the double-tongue this way. With this alternative method, Mario will be airborne for much of the duration of the double-tongue, and so the relevant sprites must be positioned differently for it to work. If you do have a falling powerup but the jump method is not possible, a third option is to duck under the powerup, and release Down to un-duck on the same frame that X/Y is pressed to activate the tongue; this also eliminates the frame-perfect timing but the inputs can not be done as reliably as the jump method. In 96 exit speedruns (and other categories where applicable), only the jumping method is commonly used, and the other two methods are generally thought of as obsolete.
As the name suggests, when a double-tongue is performed, Yoshi sticks his tongue out twice. The first tongue comes during the powerup animation, and the second after the first ends. To perform a stun glitch, the first tongue should grab a sprite which Yoshi can store in his mouth, such as a Koopa shell. This will make Yoshi's mouth full. The second tongue should touch a different sprite (not necessarily one Yoshi can normally hold in his mouth), and the sprite slot of that sprite must be set up carefully to make the rest of the glitch work. However, after the tongue grabs this second sprite, but before it enters Yoshi's mouth, Mario must be knocked off Yoshi, similar to in an eat-cancel glitch. This sequence of events causes the sprite slot of the second sprite to be stored in Yoshi's mouth, but the sprite itself is not in Yoshi's mouth. In this state where the two are desynchronized, Yoshi can spit the sprite out of his mouth, but the sprite can also freely walk around the level and interact with things; in particular, it can be despawned and a new sprite can be spawned in its slot.
After the first tongue retracts fully, the first sprite is in Yoshi's mouth, and so this sprite is what determines what abilities Yoshi has. In particular, with a blue Yoshi and a shell of any color or a Yoshi of any color and a blue shell, Yoshi will get wings, as in Groovy in the video above. Once the second tongue retracts, this is updated to the new sprite which was hit by the second tongue, but that sprite is not actually in Yoshi's mouth. In the video, this again gives you wings. If that sprite despawns, Yoshi maintains his same abilities until a new sprite is spawned in its place (typically the sliding blue Koopa) at which point they are updated. With this in mind it is often possible to determine in real-time whether the boss kill will still be possible or has failed due to improper sprite slot management well before completing the full sequence of events.
Stunning a Sliding Blue Koopa
For the boss kill glitch, the goal is to stun a sliding blue Koopa. Note that it must still be in its sliding animation or have just stood up; once the blue Koopa starts walking it is technically a different sprite and the boss kill is not possible. Conceptually, to do this, all that needs to be done is despawn the sprite that is in the sprite slot which is tied to Yoshi's mouth (the second sprite in the double-tongue glitch) by any means, and spawn a sliding blue Koopa in its place. At this point Yoshi can spit the sliding blue Koopa out of his mouth to put it in its stunned state at any time (until it stands up of course).
However, doing this just gives us a stunned sliding blue Koopa, which is not very useful on its own. What is required to spawn a boss from the Koopa is to set its stun timer. The stun timer will then count down, and when it reaches 0, a new sprite will spawn out of the stunned sprite. This is an intended game mechanic which is used so that naked Koopas can jump out of their shells after Yoshi eats the shell and spits it back out, but the ability to stun almost any sprite in the game is obviously not intended and when other sprites' stun timers hit 0, many other sprites can be spawned. In the case of a sliding blue Koopa, the sprite that is spawned is a koopa kid boss (the same sprite is used for all Koopa kids apart from Wendy/Lemmy).
Luckily, the game reuses the stun timer as the timer for how long to display the dust cloud after an enemy is killed by Yoshi or by Mario's spin jump. Jumping on the sliding blue Koopa before it is stunned lets the player set the timer to 1F (or 31 in decimal). From there, the player must spit the sliding blue Koopa out of Yoshi's mouth to put it in its stunned state before the timer hits 0. Once the timer does hit 0, the Koopa Kid boss will spawn from the stunned Koopa. In practice this maneuver is tricky, and if done incorrectly, the boss may hurt Mario while riding Yoshi or be killed by the stunned koopa sprite. Note that there are other ways to set the stun timer of the Koopa; in particular, it is also set on the frame the Koopa spawns, and this can be exploited for a faster (but more precise) boss kill method in Groovy:
Video: Faster ending for GBK Source: MostlySMW
Defeating the Boss
The koopa kid boss's properties are determined by the room it is spawned in, and spawning one outside the normal boss rooms is not intended so it ends up somewhat glitchy. The boss has similar properties to Morton, Roy, and Ludwig. In particular, it can be defeated after 3 or more hits if the last hit is a jump, or 12 hits if fireballs are used. Note that after the boss is jumped on once, it teleports to an inaccessible location, meaning that jumps alone will not suffice; at least 2 fireballs are required. But unlike Morton, Roy, and Ludwig, the boss has a very long "animation" which it plays when it is killed via a jump. Because of this, 12 fireballs is actually generally a faster method than 2 fireballs and a jump to kill the invisible boss.
To dispatch with the boss as quickly as possible, the player needs to get very close to the boss while mashing X and Y to shoot fireballs. Because of the interaction framerule for Mario's fireballs, if Mario stands too far away from the boss, the fireballs will each take 4 frames longer to reach their target, which adds up to quite a significant time loss. However, the boss can still hurt Mario and is invisible, so it is slightly risky to do this. Many runners will wait until a couple fireballs connect to get a good idea of the boss's location before closing in. Additionally, while the boss is spawned, it is crucial that Mario not move too far left or right or else Mario will get stuck and not be able to move horizontally. The specific conditions involve the camera position relative to screen boundaries, but as screen boundaries are not visible in the game itself, the limits need to be manually tested for any level where a boss kill is being done.
For speedrunning purposes, it is also noteworthy that the boss kill will cause a longer fanfare to play than beating a level via a goal tape. The boss kill fanfare is approximately 1.68s longer, which is more than 2 in-game seconds. One should be careful to time strats correctly with this in mind. The Practice Cart will automatically give the correct time including the fanfare (but it will not account for any powerup transitions during the fanfare).