Actually, IE6 is the one that has compatibility problems. IE8 complies to a large part of current web standards, and those are well documented. If you don't need to support IE6 anymore, just look up the standards and code against them.
Other than that, there is hardly any other way than test against the real thing. The recommended way of doing so (since you can't have multiple versions of IE on the same OS install) is to install one virtual machine per version. Microsoft offers free OS images (with time-limited activation) for this particular purpose.
If you need to support both IE6 and IE8, your best bet are conditional comments: see http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx for documentation. They allow you to show content for selected versions of IE only, and hide it for the rest (including non-IE browsers).
IE8 also adds a few security measures that could bite you, so be sure to test thoroughly.