Flying ants come in many varieties, including carpenter ants that might try to nest in your home and harmless black ants. The wings on flying ants are sometimes temporary, and the insects will die after a day or two. Usually they are flying either to find a new nest or to mate. The best way to get rid of flying ants in your home is to make it unappealing to them.
Find out if you have flying ants or termites. They look similar when they are flying around, but ants have a pinched waist, bent antennae and come out in the summer, while termites have no waist, straight antennae and come out in the spring.
Remove any places from around your home that ants like to nest in. This includes any wooden boards, firewood or crates.
Clean your home thoroughly to remove any food sources for ants to feed on. Clean the floors with a vacuum and mop any hard surfaces with a mixture of equal parts water and vinegar. Wipe down your counters, clean the dishes and sink after every use and dispose of all your food-related garbage. If the ants have nothing to eat, they won't come into your home.
Sprinkle boric acid powder along the area the ants enter at, be it a window or door. If you have small children or animals, keep them away from the area until the ants are dead, as boric acid is a strong poison.