Hearing aids usually squeal due to feedback from the sounds that enter your ear and then leave your ear and then those sounds make their way back to your ear and hearing aids microphone which causes the feedback and squealing.
Sometimes you may have to adjust the sound level of the hearing aids to stop the squealing which sometimes works.
Your hearing aids may not be in your ear tight enough either which can lead to the sounds causing feedback into the microphone that leads to squealing.
Just like a regular microphone can get feedback when the microphone is too close to the output speaker the hearing aids can get the feedback if sounds bounce back through the microphone from your hear.
So make sure the hearing aids are a the right setting and are in your ears tight enough.
Sometime interference from radios, televisions etc can cause feedback as well.
You may need to take your hearing aids to a hearing aid place where they can make sure the hearing aids are properly adjusted.