It depends on the method and medium you use, as well as the colony size. There are a lot of DIY procedures that you can apply, but if not done thoroughly, you end up seeing ants again. There are also plenty of insecticides available in the market that can kill these pesky insects either instantaneously or gradually. To completely exterminate a colony, it would take at least 2 weeks and sometimes months of treatment is required depending on the size.