Heartworms are transmitted through the bite of an infected mosquito, and the infection cannot be transmitted directly between dogs. The time it takes for symptoms to appear can vary.