Have no idea what your issue is. We need a full and clear description of the problem, exactly what you are seeing, what app you are running when it happens, if you are getting any error messages. We cannot help you if you are not willing to take the time to describe your issue clearly and completely.
You've also found the eMac forum, not the iMac forum. iMacs made since 2006 are very different from any eMac. And this forum is getting very few views today.
We don't know what Mac OSX version you have; knowing the OS version makes for more effective troubleshooting.
Please do "About this Mac" from your Apple menu. Form the reults weindow, tell us what is shown for "Mac OS X version" and "Processor." With that we can get you to a more active forum.
Also post what you are doing with teh comptuer when teh black box appears--program used,etc.