Chickens do not have to mate for a hen to lay eggs. A hen lays eggs even when a rooster does not live in the flock.
Many hens lay a specific number of eggs. This is called a clutch and normally consists of 12 eggs. The hen sits on the eggs in order to hatch them, even if they aren't fertilized by a rooster. This behavior is often referred to as brooding or broody conduct. To breed chicks, a rooster fertilizes the hen's eggs by mounting the hen and mating with her. A rooster normally does a dance around the hen to attract her attention and trigger a response before mating.