Whistling (feedback) occurs when amplified sound returns to the microphone and is re-amplified. This happens with all microphones. Most hearing aids (even ones costing thousands of dollars) whistle when not inserted properly into the ear canal.
You can confirm that your hearing aid is working properly by removing the aid and covering the hole in the tubing/domes with your finger (the whistling should stop). Try pulling your ear up and back and reinserting ear piece into ear so it fits better (or try a different sized ear dome).
Sometimes feedback may occur when you have a blockage of wax in the ear canal, a stiff eardrum (from a cold, for example) or any condition that causes sound to be reflected from the ear canal. In these cases, the fit may be fine, and the feedback will disappear when the condition is corrected.
Check for any cracks in the tubing or the earhook. For optimal performance, the hearing aid tubing and domes should be replaced every 3-6 months.
Lower the volume if it is set too high.
Clean any debris or ear wax that may be blocking the tubing or ear dome.
If you cannot obtain a good fit, consider getting a custom mold made to your ear.