HUD is the widely used acronym for Heads Up Display. In Sonic games it usually contains an overview of informations such as score, elapsed time, number of lives remaining, number of rings collected.
The ring counter flashes red (or, in Sonic 3 & Knuckles, simply flashes) if the player has no rings; the timer flashes red from 9:00 to 9:59 (although a bug in Sonic 1 prevents it from flashing if the player has at least one ring).
In Sonic 2, the HUD uses an italic font to increase its readability while in the interlaced mode used in 2P gaming. Once the interlaced mode has been dropped in Sonic 3 & Knuckles, the HUD became straight again. In Sonic 2's 2P mode, the HUD doesn't display the score; in Sonic 3's 2P mode, the HUD has been completely redesigned and displays only the time (with centiseconds) in the top left corner, and the current lap in the top right corner.
The HUD is also different in the Special stages. Sonic 1's special stage has no HUD whatsoever. Sonic 2's special stage displays either the rings collected by Sonic and Tails in the top left and top right corner respectively, and the total at the top at the centre, or the rings collected by the character himself while not playing as Sonic and Tails together. Sonic 3 & Knuckles' special stage displays the number of remaining blue spheres in the top left corner, and the number of collected rings in the top right corner (in Blue Sphere mode, the ring counter counts downwards to show the number or rings you need to get a Perfect).
Finally, in Sonic 3 & Knuckles' bonus stages, the HUD resembles the one used for the main levels, but only displays the amount of rings and the life counter.