'Heartworm' is actually a parasitic roundworm, only drawing its name from its last adult cycle, which is spent mainly in the Right Ventricle of the Heart.
From larvae to adult, however, it lives in a couple different places:
1. The stomach of a Mosquito
2. At the site of the Mosquito bite on the animal, under the skin
3. In the muscles of the chest and abdomen
4. Bloodstream to Heart [Pulmonary Artery]