• One glitch in Sonic 1 involves hitting an enemy at the end of a level, while the end of level scoring screen is shown. (It can also be done by debugging so that Sonic falls off the bottom of the screen.) When you arrive at the next level, you will end up with 0 lives. Kill Sonic again to end up with a "[glitch]5", meaning 255 lives. This is fixed in Sonic 2.
• A double-death glitch can be performed in Labyrinth Zone in Sonic 1 in the underwater handlebar section by releasing from the handlebar as soon as Sonic drowns, landing on the spikes, and causing a double death. The same "[glitch]5" will appear in the life counter.
• A drown/time-over glitch occurs in both Sonic 1 and 2, where you wait until the timer is down to the last 30 or so seconds, then enter water. Time it correctly so that the drown countdown ends at 9:59 and you will get another form of the double-death glitch. This behaviour was fixed in Sonic 3 and later.
• In Sonic 2, if a player dies from time-over in a 2P Versus mode while on their last life, the Game Over routine will be interrupted and the results screen will be displayed. The player who died will appear to have 0 lives, but if they die again, the counter will display "y5" (255). This, AFAIK, was not fixed in any Sonic 2 revision.
I haven't seen the fourth one documented anywhere before, but the first three can be found here.