Humans are an aberrant host for heartworms. Basically, what this means
is that the microfilaria (baby heartworms) are transferred to humans and
they try to follow their normal lifecycle but can't, because they are in the
wrong host. This does not prevent them from succeeding in making it
partway through their lifecycle, though. So instead of winding up in the heart
and pulmonary arteries and living several years, as occurs in dogs, the
heartworms usually end up as cysts in the lungs. These cysts look
pretty much like lung cancer on an X-ray and a number of humans have had
surgery to remove the cyst and/or lung lobes as the result of the resemblance.
In addition, on rare occasions, heartworms find another spot in the body
with oxygen levels and conditions that support their development and live
there for some time. In humans, a spot that has these conditions is the
interior of the eye. So heartworms are occasionally found inside the eye in
humans.