I can't go into it very in depth here, so I'll refer you to the excellent article in the SDK wiki
here. But basically, to keep from rendering the entire world, even things you can't see, the program vvis cuts up all the open space in your map into various rectangular areas. Each area is called a "visleaf", short for "visibility leaf", and all the visleafs are collected into a "visibility tree". Each leaf knows all the other leaves the player could potentially see while in it, and so the engine only renders those leaves. Without visleafs, games like TF2 would run at the speed of a powerpoint slideshow.
Now, on to why they could take so long. First of all, did you create any irregularly shaped objects, like spheres or cylinders, particularly if they have a large number of faces? Objects like these are the achillies heel of visleaf compilers. If you had an empty room with a 32 sided sphere on a 16 sided column, that room would be cut into hundreds of visleafs. I had 8 of those in my first map lining a walkway, and it still wasn't done compiling after an hour. However, hammer gives you tools to combat this. If you do have a complex or ornate object made out of brushes, they tend not to block visibility at all. Whether you cut it into 100 visleafs according to the faces of the object, or remove it, the engine will still render practically the same number of objects. In this case, it's best to turn all of them into a 'func_detail' brush. Func_details are ignored while building visleafs, and therefore don't impact the compile time almost at all. However, detail brushes can't be used to separate the inside of your map from the outside. If you do make this mistake, you'll cause a leak in your compile.
Hopefully I was able to help. Good luck mapping.
