To ensure a smooth connection between flights, it's important to give yourself enough time between the arrival of one flight and the departure of another. No worries! Airlines keep this in mind when selling itineraries to prevent you from missing a flight.
The amount of time between connecting flights is referred to as "minimum connection time" in the airline industry and it's dependent on the size and configuration of each airport to allow for security checks and terminal changes. If an itinerary does not meet the minimum connection time at your connecting airport, than the flights cannot be sold and booked together.