Air conditioner compressors usually fail due to one of two conditions: time and hours of operation (wear out), or abuse. There are some failures that can occur elsewhere in the system that will cause a compressor failure, but these are less common unless the system has been substantially abused.
Usually abuse is a result of extended running with improper freon charge, or as a consequence of improper service along the way. This improper service can include overcharging, undercharging, installing the wrong starter capacitor as a replacement, removing (rather than repairing/replacing) the thermal limiter, insufficient oil, mixing incompatible oil types, or wrong oil, installing the compressor on a system that had a major burnout without taking proper steps to remove the acid from the system, installing the wrong compressor (too small) for the system, or installing a new compressor on a system that had some other failure that was never diagnosed.
The compressor can fail in only a handful of different ways. It can fail open, fail shorted, experience a bearing failure, or a piston failure (throw a rod), or experience a valve failure. That is pretty much the entire list.
When a compressor fails open, a wire inside the compressor breaks. This is unserviceable and the symptom is that the compressor does not run, though it may hum. If the compressor fails open, and following the steps here does not fix it, then the system may be a good candidate for a new compressor. This failure causes no further failures and won't damage the rest of the system; if the rest of the system is not decrepit then it would be cost effective to just put a new compressor in.
Testing for a failed open compressor is easy. Pop the electrical cover for the compressor off, and remove the wires and the thermal limiter. Using an ohmmeter, measure the impedance from one terminal to another across all three terminals of the compressor. Also measure the impedance to the case of the compressor for all three terminals.
You should read low impedance values for all terminal to terminal connections (a few hundred ohms or less) and you should have a high impedance (several kilo-ohms or greater) for all terminals to the case (which is ground). If any of the terminal to terminal connections is a very high impedance, you have a failed open compressor. In very rare cases, a failed open compressor may show a low impedance to ground from one terminal (which will be one of the terminals associated with the failed open). In this case, the broken wire has moved and is contacting the case. This condition - which is quite rare but not impossible - could cause a breaker to trip and could result in a misdiagnosis of failed short. Be careful here; do an acid test of the contents of the lines before deciding how to proceed with repair.
When a compressor fails short, what happens is that insulation on the wires has worn off or burned off or broken inside the compressor. This allows a wire on a motor winding to touch something it should not touch - most commonly itself a turn or two further along on the motor winding. This results in a "shorted winding" which will stop the compressor immediately and cause it to heat up and burn internally.
Bad bearings can cause a failed short. Either the rotor wobbles enough to contact the stator, resulting in insulation damage that shorts the rotor either to ground or to the stator, or end bearing wear can allow the stator to shift down over time until it begins to rub against the stator ends or the housing.
Usually when one of these shorts occur, it is not immediately a hard short - meaning that initially the contact is intermittent and comes and goes. Every time the short occurs, the compressor torque drops sharply, the compressor may shudder a bit visibly as a result, and this shudder shakes the winding enough to separate the short. While the short is in place, the current through the shorted winding shoots up and a lot of heat is produced. Also, usually the short will blow some sparks - which produces acid inside the air conditioner system by decomposing the freon into a mixture of hydrochloric and hydrofluoric acid.
Over time (possibly a couple of weeks, usually less) the shuddering and the sparking and the heat and the acid cause insulation to fail rapidly on the winding. Ultimately, the winding loses enough insulation that the inside of the compressor is literally burning. This will only go on for a few minutes but in that time the compressor destroys itself and fills the system with acid. Then the compressor stops. It may at that time melt a wire loose and short to the housing (which can trip your house main breaker) or it may not. If the initial cause of the failure was bad bearings causing the rotor to rub, then usually when the thing finally dies it will be shorted to the housing.
If it shorts to the housing, it will blow fuses and/or breakers and your ohmmeter will show a very low impedance from one or more windings to ground. If it does not short to the housing, then it will just stop. You still establish the type of failure using an ohmmeter.
You cannot directly diagnose a failed short with an ohmmeter unless it shorts to the housing - a shorted winding won't show up with an ohmmeter though it would with an inductance meter (but who has one of those?) Instead, you have to infer the failed short. You do this by establishing the the ohmmeter gives normal readings, the starter capacitor is good, power is arriving at the compressor, AND an acid test of the freon shows acid present.
With a failed short, just give up. Change everything, including the lines if possible. It is not worth fixing; it is full of acid and therefore is all junk. Further, a failed short could have been initially induced by some other failure in the system that caused a compressor overload; by replacing the whole system you also will get rid of that potential other problem.
Less commonly, a compressor will have a bearing failure, piston failure or a valve failure. These mechanical failures usually just signal wear out but could signal abuse (low lubricant levels, thermal limiter removed so compressor overheats, chronic low freon condition due to un-repaired leaks). More rarely, they can signal another failure in the system such as a reversing valve problem or an expansion valve problem that winds up letting liquid freon get into the suction side of the compressor.
If a bearing fails, usually you will know because the compressor will sound like a motor with a bad bearing, or it will lock up and refuse to run. In the worst case, the rotor will wobble, the windings will rub on the stator, and you will wind up with a failed short.
If the compressor locks up mechanically and fails to run, you will know because it will buzz very loudly for a few seconds and may shudder (just like any stalled motor) until the thermal limiter cuts it off. When you do your electrical checks, you will find no evidence of failed open or failed short. The acid test will show no acid. In this case, you might try a hard-start kit but if the compressor has failed mechanically the hard-start kit won't get the compressor to start. In this case, replacing the compressor is a good plan so long as the rest of the system is not decrepit. After replacing the compressor, you must carefully analyze the performance of the entire system to determine whether the compressor problem was induced by something else.
Rarely, the compressor will experience a valve failure. In this case, it will either sit there and appear to run happily but will pump no fluid (valve won't close), or it will lock up due to an inability to move the fluid out of the compression chamber (valve won't open). If it is running happily, then once you have established that there is indeed plenty of freon in the system, but nothing is moving, then you have no choice but to change the compressor. Again, a system with a compressor that has had a valve failure is a good candidate for a new compressor.
Now, if the compressor is mechanically locked up it could be because of a couple of things. If the compressor is on a heat pump, make sure the reversing valve is not stuck half way. Also make sure the expansion valve is working; if it is blocked it can lock the compressor. Also make sure the filter is not clogged. I once saw a system that had a locked compressor due to liquid lock. Some idiot had "serviced" the system by adding freon, and adding freon, and adding freon until the thing was completely full of liquid. Trust me; that does not work.
Should diagnosis show a clogged filter, then this should be taken as positive evidence of some failure in the system OTHER than a compressor failure. Typically, it will be metal fragments out of the compressor that clogs the filter. This can only happen if something is causing the compressor to wear very rapidly, particularly in the pistons, the rings, the bores, and the bearings. Either the compressor has vastly insufficient lubrication OR (and more commonly) liquid freon is getting into the compressor on the suction line. This behavior must be stopped. Look at the expansion valve and at the reversing valve (for a heat pump).
Often an old system experiences enough mechanical wear internally that it is "worn in" and needs more torque to start against the system load than can be delivered. This system will sound just like one with a locked bearing; the compressor will buzz loudly for a few seconds then the thermal limiter will kill it. Occasionally, this system will start right up if you whack the compressor with a rubber mallet while it is buzzing. Such a system is a good candidate for a hard-start kit. This kit stores energy and, when the compressor is told to start, dumps extra current into the compressor for a second or so. This overloads the compressor, but gives some extra torque for a short time and is often enough to make that compressor run again. I have had hard-start kits give me an extra 8 or 9 years in some old units that otherwise I would have been replacing. Conversely, I have had them give only a few months. It is your call, but considering how cheap a hard-start kit is, it is worth trying when the symptoms are as described.
And this, in a nutshell, is what can happen to an air conditioner compressor and what you can do about it.