Ticks typically need to be attached for 24 to 48 hours before they can transmit infections such as Lyme disease. Prompt removal of ticks is crucial to prevent disease transmission.