Air filters inside of the cabin and engine help to filter out dust, pollen or other debris that may attempt to enter your vehicle. This is important because these particles may coat or clog key components that allow your vehicle to run smoothly. Furthermore, pollutants that get inside of a cabin can make it harder for you and your passengers to breathe.
Generally speaking, filters should be changed every 90 to 180 days depending on how often you drive and where you drive. If you drive to work and back each day on dirt roads, you may need to change a filter more often than you would if the vehicle traveled mostly on pavement.
An air filter that is black or brown should be changed right away as its too dirty to do its job properly. The same may be true of any filter that gets wet for any reason.