This glitch for Pokémon Yellow is an application of the Trainer escape glitch, which allows for the player to obtain glitch items using the glitch Pokémon p PkMnp' ' (C2).
See also get glitch items using left-facing shore tile glitch for a similar glitch in Pokémon Red and Blue.
Please note that this glitch is now obsolete for dry underflow glitch combined with Celadon looping map glitch, which combined allow for the player to obtain any glitch item.
Only a few glitch items are available this way, as explained below.
p PkMnp' ' (C2) is an item mutation glitch Pokémon. There are several item mutation glitch Pokémon, though unfortunately most freeze the game if encountered in the wild.
Its Pokédex number 230 causes it to mutate the fifth item (see glitch Pokédex flags).
Like Missingno. which increases the sixth item quantity by 128 unless you already have 128 or more items, pPKMNp mutates the fifth item by +20 in hexadecimal, though only under special circumstances. The existing item must have an index number of hex: 0X, 1X, 4X, 5X, 8X, 9X, CX or DX (where X can be any digit) to be mutated because for other identifiers, the game assumes that you have that flag already checked.
Several glitch items can be obtained this way, such as a battle grinding glitch item called Lg -, (hex:6E) though it behaves differently and has a different name in Red/Blue. When used in battle, the game will freeze for a few seconds and the battle will restart, though otherwise its perfectly safe within Pokémon Yellow. This can be used for Elite Four grinding, to essentially battle more than 5 Trainers in one go (however using Lg- too many times may freeze the game). Outside of battle it just causes odd graphical glitches.
To get Lg - you must have a Super Rod (hex:4E) in the fourth position, so if you really need it you might want to encounter a fossil Missingno. to duplicate your Super Rod first.
To encounter p PkMnp' ' with the Trainer escape glitch, the 'Ditto glitch' may be used with a Pokémon with a Special stat of 194.