HIV is primarily transmitted through sexual contact, sharing of needles, and from mother to child during childbirth or breastfeeding. TB is spread through the air when a person with active TB disease in their lungs coughs, speaks, or sneezes, releasing TB bacteria into the air. Close and prolonged contact is usually necessary for transmission.