AC compressors fail, in the strict sense of the verb, whenever a mechanical part inside them breaks. So, a failure of the compressor, per se, necessarily implies a contamination of the AC system with different types of debris, which then requires a flush to remove not only the pieces of the mechanical parts that failed, which may greatly vary in dimension, but any contaminated oil (especially any oil charge that degraded, thereby losing its lubricating properties, leading to the compressor's seizure; one possible, and frequent, case may be running a compressor on a very low refrigerant charge, which implies higher than normal refrigerant vapour superheat and lower oil circulation, which both lead to an important overheating of the compressor and, therefore, a thermal degradation of the lubricant oil inside the compressor; another one may be hygroscopic lubricant oil which caught too much moisture, not successfully removed by the vacuum and by a saturated receiver dryer dessicant).
Diagnosing the failure of a compressor and its extent of damage, apart from removing the system's parts (most importantly, lines, liquid receiver/accumulator and expansion valve or orifice tube) after safely and legally evacuating its refrigerant, checking the color and purity of the oil drained from the system (through a recharge station; a certain quantity of oil, which of course has to be injected back in the system as new oil of the correct type and viscosity, is always drained by the machine along with the refrigerant, and stored in a separate container) or trying to turn its clutch hub (there has to be some resistance to movement but not enough to completely impede rotation without forcing the hub in any way. The following check, in order to avoid any injury risk, has to be done with the AC system off and the engine off and not being able to start; the compressor's clutch hub has to rotate smooth by hand, up to the point that all that it's needed to rotate it is one little finger; otherwise, the compressor has to be scrapped and it's not worth spending any more time on it) and feeling for any binding, is not necessarily a simple task: what may often fail on an otherwise healthy compressor "shell" may a compressor cycle related part, such as the control valve of a variable displacement compressor (a failure which may leave the compressor in a permanently stroked or destroked condition, and the former is the damaging one since liquid refrigerant, not before turning the evaporator into a giant block of ice impeding any airflow from the vents that is, may eventually find its way in the compressor slug it and pretty make it "Let it Go" by also covering it and the suction line with frost, while the latter leaves you with a compressor that can actually pump something, but not enough to satisfy the evaporator's thermal load), or the clutch coil of a clutch equipped compressor (especially if it features a thermal fuse in series with the coil), or even the thermal protection switch of a rotary vane or scroll compressor or the clutch assembly (if the hub plate gap increases making the compressor clutch cycle too much or not engage at all).
Clutchless compressors are known to fail in a peculiar way: whenever the compressor starts seizing up, a connection between the pulley and the compressor's shaft severs, making the pulley freewheel. And, of course, what applies with clutch equipped compressors doesn't apply with them; the compressor's belt or serpentine belt has to come off to check how it failed.
As you can see, an ac system's failure does not necessarily imply physical damage to the compressor itself, but diagnosing the issue can be an hard task, which necessarily has to begin by identifying the model and type of the compressor, and is best left to professionals.