Hens will lay eggs regardless of whether or not they are being kept in the company of a rooster. Your laying hen's body is naturally intended to produce an egg once every 24 to 27 hours and it will form the egg regardless of whether the egg is actively fertilized during its formation. Eggs form inside your hen's body when her ovary releases the egg yolk into the oviduct. If a rooster has access to your hen and chooses to mate with her, the egg will be fertilized when it is traveling through the oviduct.
The egg also will develop the egg white and eggshell form while the egg is traveling through the oviduct. Your hen's eggs will be edible regardless of whether it has been fertilized. The only reason you would need a rooster is if you want your eggs to be able to hatch into chicks. A broody hen can sit on fertilized eggs until they hatch or the eggs can be placed in an incubator and cared for artificially until they hatch.