When you think about the North Pole covered by a permanent icecap, then contrast that with the Amazon rain forest at the equator, it seems obvious that climate changes with latitude. But when you think of the frosty, frigid peak of Mount Everest and the middle of the Sahara Desert -- both at the same latitude -- it seems obvious that climate changes with elevation. Both are true, but there are also additional factors that regulate climate.
Climate refers to the long-term weather patterns in a specific region. It includes factors like average temperature and rainfall and also the expected variation in those temperatures. It's strongly influenced by humidity, which is in turn linked to proximity to large bodies of water and prevailing wind and ocean currents. Every climate has a "normal" range of variability. For example, Mount Shasta, California, and Dayton, Ohio, have the same average annual rainfall. But Mount Shasta's rain tapers off significantly in summer, while Dayton has pretty much the same amount of rain in every month. If there were to be no rain at all in July on Mount Shasta, it wouldn't be that unusual. No rain in July in Dayton would be remarkable.
Solar energy drives the Earth's weather, so it should be no surprise that latitude is an important factor in climate. At the equator, days are the same length all year long, while at the poles there are seasons of no sun and constant sun. So equatorial climates have relatively uniform temperature throughout the year, while polar temperatures change with the season. In temperate regions -- at higher latitudes than the Tropics of Cancer and of Capricorn -- the sun never gets straight overhead, so more energy gets absorbed by the atmosphere. The higher the latitude, the lower the amount of solar energy, meaning lower average temperatures. You would expect Singapore, Seoul and Stockholm to have climates that reflect their different latitudes, and with average temperatures of 27, 11 and 6 degrees Celsius (80, 52 and 42 degrees Fahrenheit), they do.
Anyone who stands in sweltering summer heat in Pueblo, Colorado, and looks up at snow-covered Pike's Peak knows that elevation is a factor in climate. The pressure, temperature and moisture content of air all change with altitude. You can see the effects on climate in places like the Grand Canyon. There, the elevation changes dramatically with almost no change in latitude. When descending the 1,750 meters (5,800 feet) from the North Rim to the Colorado River, you will travel through climate zones representative of conditions from central Canada to central Mexico -- as if you walked through 25 degrees of latitude.
Boston is at a latitude of 42 degrees north and an elevation of 6 meters (19 feet) above sea level. Barcelona is at a latitude of 41.5 degrees and an elevation of 95 meters (311 feet). That is, they're both very close to the same latitude and the same elevation, yet Boston has an average annual temperature of 11 degrees Celsius (51 degrees Fahrenheit), while Barcelona's average temperature is 16 degrees Celsius (61 degrees Fahrenheit). In addition, Boston's average annual temperature range is 25 degrees Celsius (44 degrees Fahrenheit), while Barcelona's is only 15 degrees Celsius (28 degrees Fahrenheit). Although their latitudes and elevations are the same, their climates are quite different because factors like prevailing air and ocean currents also strongly influence climate.