The difference is in the user agent string.
"IE7" emulates IE7's user agent string exactly, showing MSIE 7.0.
"IE8" uses IE8's native user agent string exactly, showing MSIE 8.0 as well as Trident/4.0, which is the version of the Trident layout engine used in IE8.
IE8-Compatibility uses the browser's native user agent string, but changes "8.0" to "7.0".
Because Trident did not have a version number prior to IE7, the IE7 string does not show "Trident/x.x". So with an MSIE 7.0 user agent string, if "Trident/4.0" is also present, you know it's IE8 running in compatibility view; if "Trident/x.x" is NOT there, you know it's either the real IE7 or IE8 in IE7 mode (not compatibility mode).
I hope my explanation is clear enough, and here is an example of some user agent strings below.
IE7:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; FDM; MS-RTC EA 2; Tablet PC 2.0; .NET4.0C; .NET4.0E)
IE8:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; FDM; MS-RTC EA 2; Tablet PC 2.0; .NET4.0C; .NET4.0E)
IE8-Compatibility:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; FDM; MS-RTC EA 2; Tablet PC 2.0; .NET4.0C; .NET4.0E)