Hens lay eggs all of the time, but most hatchery breeds won't go broody (broody hens don't lay eggs = drop in profits.) Even if there's a rooster, the chicken simply has no desire to set. Often, hens will set if no rooster is present.
You appear to have sexlinks in your profile picture. Those are almost guaranteed not to go broody. Cochins, silkies, pekin bantams, game hens, buff orpingtons, and many heritage chicken breeds will go broody.
Eggs can sit without being brooded for about ten days before fertility begins to decline.
If you want to hatch eggs, buy a broody breed or buy an incubator.
Good luck!