Several ways
1) in many units, there is a gas control or regulating valve that control gas flow, and because the flow through it is pretty fast, it can whine - probably a whistle inside the unit, but commonly sounds like a whine outside. Not having the right amount of fluid in the system can cause expansion of the fluid in this regulator (which should not happen) because there is not enough pressure on the other side - so whistles or whines.
2) when short on fluid, compressor has to run a lot longer each cycle to compress what gas there is back into liquid, so unit gets hot and noisier. If short on fluid, the fluuid actually serves as a coolant to remove heat from the compresssor, so low on fluid is similar to low on antifreeze in your car - unit heats up more, which increases friction and noise.
3) some type units can vapor-lock the system when gas pressure is too low, so the drive belt slips on the pulleys causing a screech or whine, till the belt melts through
4) the number one reason is the gas has a lubricant in it, to lubricate the compressor - so if the compressor was whining or screeching due to lack of lubricant, you might have reduced the compressor life a good bit.
Number one rule with fans, compressors, furnaces and such - both in cars and houses - if it is screeching or whining or wailing, TURN IT OFF as soon as feasible until fixed - or you are likely to be looking at parts replacement rather than just adjustment or fluid addition.