Both male and female mosquitoes are nectar feeders, and useful flower pollinators, but females need a good protein-rich blood meal for egg production. And, thanks to millions of years of evolution, they have become adept at tracking that meal down.
How they find us
The female mosquito employs a number of cues to find us, including the heat we emit and an array of chemicals we exhale and release from our skin. At 40 metres mosquitoes can detect the carbon dioxide we breathe out, while at closer range, other chemicals, like lactic acid and octenol in our sweat, become more important for them to zero in on.
And yes, some people are mosquito magnets who send out a particularly attractive mix of chemicals, but as this is largely determined by your genetics there is not a lot you can do about