The Guardian (ガーディアン,Gādian?) is a robotic, rock-like sub-boss that appears in Sandopolis Zone from Sonic & Knuckles. When the pyramid rises at the end of Act 1, he appears out of the door and prepares to battle.
The Guardian attempts to jump on the player, but is quite slow. The only part of the guardian that is vulnerable is its head. If the head is struck, the Guardian will fall apart and fly backwards, leaving it as just a lump of rock. However, the guardian soon reforms at full health, and continues its attack. It is impossible to destroy the guardian simply by attacking it. Instead, it can be defeated by causing it to sink into a pit of quicksand on the far left of the boss arena.
The player can either repeatedly attack the Guardian's head from the right, slowly knocking it backwards until it falls in the quicksand, or lure the Guardian to jump into the quicksand itself by keeping on the Guardian's left.
Sonic the Comic
The Stone Guardian made a brief appearance in the "Mystery of the Sandopolis Zone" story in Sonic the Comic#48. After Captain Plunder raised the pyramid from the sand, Stone Guardian appeared to prevent anyone from entering. Sonic tried to destroy it with his "Sonic Spin Attack", but, much like the game, he reassembled his body. Knuckles managed to trick the Stone Guardian into walking into quicksand where it was defeated.
The spinning Goal Post does not drop down at the location of the sub-boss when it was defeated (because this would cause the Goal Plate to land in the quicksand pit). Instead, it drops at a set point on solid land (but can still be knocked into the quicksand pit if the player hits it before it lands).
Also, the boss music doesn't end until the Goal Plate lands on the ground and Sonic/Tails/Knuckles perform their victory pose (unlike other bosses whose music ends after dealing the final hit).