The nasal cavity filters, warms, and humidifies incoming air. It also helps trap dust particles and other foreign matter, preventing them from entering the respiratory system.