The boys were rescued in the final chapter of the book. The reason it took so long is, as pointed out by Piggy in the first chapter, there is a war going on. Piggy says that no one knows where they crash landed and that there was an atom bomb dropped in the country they are from that killed many people. There is no way for the boys to communicate with the outside world and there are no adults alive to help them in any way. The boys range in age from about 12 down to 6 or so. With no information given to the authorities about where the boys' plane crash landed and with the interference of the war going on and taking people's attention away from the missing plane of boys, it takes several months for the boys to finally be rescued by the English authorities.
In Chapter 4 " Painted Faces and Long Hair" the boys were not rescued because they had let the fire go out. No plane or boat could see any smoke in order to rescue them.