By biting humans, female mosquitoes can spread dangerous diseases such as malaria, dengue and Zika. To first find the human blood host, these mosquitoes use human-produced CO2, odours and visual cues. In this thesis, we studied how host-seeking mosquitoes get captured by traps that simulate human presence, and how mosquitoes manage to escape when you try to swat them. For this, we recorded many thousands of three-dimensional tracks of mosquitoes flying near a range of conventional and newly-developed traps, or when being attacked by a mechanical swatter. We discovered that mosquitoes that are attacked by the mechanical swatter are able to detect and use the airflow generated by the looming object to successfully escape from it. Using our trapping study results, we developed a new trap that produces human-mimicking heat and humidity, and that was found to capture more than four times as many mosquitoes as previous trapping solutions.