How long does it take to become fertile from the initial breeding, or how long do they stay fertile?
A few days after and they will be fertile, they can stay fertile from that breeding for several weeks in many occasions
It takes an egg about 25 hours from when it starts in the hen's internal chicken factory until it is laid. It can be fertilized in the first 15 minutes of this 25 hour process. After that, it is too far along in the process to be fertilized.
Let's say a rooster mates with a hen about noon on Monday. Monday's egg will obviously not be fertile. If Tuesday's egg started on its journey inside the hen before noon on Monday, it will not be fertile. If it starts this journey in the afternoon, it could possibly be fertile. Wednesday's egg should be fertile.
The time period starts after the rooster and hen have successfully mated. Just because they are together does not mean a rooster mates every hen in the flock the first day they meet. Certain breeds have such thick feathers that the rooster has difficulty completing his task, Cochin and Orpington are the two I hear mentioned most often in this regard. You can do a search on "vent trimming" for further info. Diet and age can effect a rooster's fertility. Some roosters have poor fertility due to genetics. Some hens and especially young pullets resist the rooster's advances, even if they are laying eggs. And some roosters are so clumsy, especially young ones, that they have difficulty hitting the target.
Just because they are together or because you see them in the act is not confirmation the hen will lay fertile eggs, no matter how energetic the rooster appears.