The other answers are right, a metallic part placed directly on the PCB could short traces, sharp edges could also cut traces. The solder mask is a lousy protection because the part can easily rub through.
But since you are a novice to EAGLE:
In the list of layers, you'll find
restricted layers which are not visible by default.
restricted areas will throw a DRC error when any copper (trace / pad / via) is places in them, as you already experienced. They are usually created as filled polygons and only used when necessary.
keepout areas will throw a DRC error when they overlap with an other
keepout area. This is used to indicate the outline of a part, and to prevent you from overlapping parts. The area can also be a bit larger than the part itself to prevent parts from being placed too close to each other.
Of course, you can draw your own polygons in that layers, e.g. to mark areas with too low headroom to place parts. But unfortunately, most parts come without polygons in
keepout and you can easily place them in your
keepout area :-(