When a CB squeals during transmit, it is feeding back RF. Normally, the transmitter portion of the CB, which is shielded inside the CB itself, sends the RF signal it is transmitting down shielded coax wire to the antenna, where the signal radiates out into the air.
If the antenna is too close to the CB transmitter, the RF signal being radiated by the antenna overloads the audio portion of the CB, and a feedback loop is established - the antenna radiates a signal, which is picked up by the audio portion of the CB, which then transmits that signal, which is radiated by the antenna, and the cycle repeats. This causes the loud squeal.
There are other things that can cause the problem than the location of the antenna. The shielded coax wire that carries the signal to the antenna is damaged, so that the RF signal can leak out close to the CB. The coax could have a short, which shorts the signal-carrying core of the coax to the shield.
Other aspects of the CB which require shielding, such as the microphone wire can also be at fault. If the shielding on the microphone or its wire is faulty, it can pick up RF from the antenna. You can rule this out by unplugging your headset and seeing if the problem still occurs.
Sometimes the wiring supplying power to the CB acts as an antenna, receiving RF from the CB antenna, and feeding it back into the CB, where it leaks into the audio circuitry.
Try plugging a different antenna into the CB and see if that makes any difference. If it still happens, and you're fairly sure the problem is with the CB itself, then you can send it to Sierra Electronics, who will fix it for a flat $100 fee.