From the Super Mario Wiki
A Pal Pill is a special item that creates an 8-man army of mini, 8-bit versions of the character being used, which then surround the character. These pals will mimic the player's motion until either the pals touch an enemy (in which case, both the pal pill and the enemy are eradicated, provided the enemy's health is low enough), or the player leaves the area. If the player switches characters when they have Pal Pills, the Pal Pills will not change as well, but retain the appearance of the character who activated them. The classic Mario jumping noise can be heard when they jump in 2D. This item is found in ? Blocks in the game Super Paper Mario, and Super Dimentio has an attack where he releases 8-bit Luigis that will die if they touch anything, but which are slightly bigger than the actual Pal Pills item.
In the Super Mario World animated series episode "Rock TV", an item similar to the Pill Pals appear. Princess Toadstool, upon hitting a ? Block in the episode, releases a brigade of miniature Marios, who began to attack the nearby Koopalings.