Mosquitos and other nasty little thingies are attracted by our sweat and the carbon dioxide we exhale. Nature has taught many plants to fend offf the insect and they evolved to have some natural insect repellant.
Even humans have some types of insect repellent, or maybe it should be called insect invisibility cloak. That substance is 1-methylpiperazine.
Main compounds that are used as insect repellents are: DEET, Icaridin, Citrioldiol, and IR3535.
Read more on Compound Chem.