An infestation of any size is a problem, but when deciding what to do about it, you will want to consider the scale of the infestation. If you notice a few rogue ants or mosquitoes in your home, a DIY plan of attack will probably do the trick. There are plenty of methods for dealing with small pest problems - traps, store-bought pesticides and homemade solutions - as long as implemented correctly, they should prove relatively effective in improving the situation.
That said, sometimes these methods eradicate only the immediate problem (a number of ants on your kitchen counter) instead of the root cause of the infestation (a colony of ants hidden by the kitchen window). This means that even if your DIY solution works in the short-term, you may still have a recurring pest problem on your hands. If you notice that pests keep returning, it may be time to call in the professionals to deal with the problem at its source.
If there are large swarms of pests in your home or on your property, it may be too late to implement a DIY solution. Your best bet for any large-scale infestations is to hire a professional pest control right away.