They both begin as an egg. Where those eggs are laid depends on a number of environmental and physiological factors, but most important is the presence of water. Mosquitoes tend to like still water. For backpackers, these preferences spell trouble. And the breeding grounds are where adult biters binge.
Males survive on flower nectar and other plant juices.
When they detect a plume of carbon dioxide being exhaled by an animal, they'll fly upwind into that plume until they locate their prey. Heat, moisture, odors from soaps and sweat, colors, and shapes also attract biters. The answer, unfortunately, is that they'd still get you. Sadly, altitude, topography, the weather, and countless other factors all combine to influence bug populations and their locations. It's very hard to predict.